Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Can't use find

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
silas2
Posts: 38
Joined: 2019-09-30 13:22

Can't use find

#1 Post by silas2 »

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: 38
Joined: 2019-09-30 13:22

Re: Can't use find

#2 Post by silas2 »

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?

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1404
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 46 times
Been thanked: 70 times

Re: Can't use find

#3 Post by None1975 »

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 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github

silas2
Posts: 38
Joined: 2019-09-30 13:22

Re: Can't use find

#4 Post by silas2 »

Still get a permission denied....

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Can't use find

#5 Post by Head_on_a_Stick »

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.
deadbang

silas2
Posts: 38
Joined: 2019-09-30 13:22

Re: Can't use find

#6 Post by silas2 »

Thanks for your help, that seems to be working with the -c switch , what does that do anyway?

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Can't use find

#7 Post by Head_on_a_Stick »

See su(1). And perhaps also man(1).
deadbang

Post Reply