Can't use find

New to Debian (Or Linux in general)? Ask your questions here!

Can't use find

Postby silas2 » 2019-09-30 13:29

I've just installed Debian/Buster, and I'm trying to search for a folder in the CLI with :
su find / -type d -name "*findcriteria*"
and I'm getting :
su: Invalid option -- 't'

where's the 't' coming from ?
silas2
 
Posts: 13
Joined: 2019-09-30 13:22

Re: Can't use find

Postby silas2 » 2019-09-30 14:03

Oops just realised su is used first to alias to a user, then the command.
But when I try that, i get a permission denied, how can that be with su/root?
silas2
 
Posts: 13
Joined: 2019-09-30 13:22

Re: Can't use find

Postby None1975 » 2019-09-30 14:06

silas2 wrote:But when I try that, i get a permission denied, how can that be with su/root?

Try
Code: Select all
 su -
OS: Debian 10.1 Buster / WM: Xmonad
Debian Wiki | DontBreakDebian, My config files in github
User avatar
None1975
 
Posts: 940
Joined: 2015-11-29 18:23
Location: Lithuania, Vilnius

Re: Can't use find

Postby silas2 » 2019-09-30 14:26

Still get a permission denied....
silas2
 
Posts: 13
Joined: 2019-09-30 13:22

Re: Can't use find

Postby Head_on_a_Stick » 2019-09-30 15:08

Code: Select all
su -c 'find / -type d -name "*findcriteria*"'

Entering su -, pressing <return> then entering the find command should work though, perhaps you should post the contents of the terminal window so that we can see exactly what you tried. You may have made a mistake.
Don't break DebianHow to report bugs

SharpBang GNU/Linux — a pre-configured Openbox/Tint2 desktop running on Debian stable
User avatar
Head_on_a_Stick
 
Posts: 10599
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Can't use find

Postby silas2 » 2019-09-30 15:24

Thanks for your help, that seems to be working with the -c switch , what does that do anyway?
silas2
 
Posts: 13
Joined: 2019-09-30 13:22

Re: Can't use find

Postby Head_on_a_Stick » 2019-09-30 15:33

See su(1). And perhaps also man(1).
Don't break DebianHow to report bugs

SharpBang GNU/Linux — a pre-configured Openbox/Tint2 desktop running on Debian stable
User avatar
Head_on_a_Stick
 
Posts: 10599
Joined: 2014-06-01 17:46
Location: /dev/chair


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 13 guests

fashionable