find command examples

10 replies [Last post]
RootFarmer
Offline
Joined: 08/24/2020

Are there any good examples of how to use find command in the terminal? Man page gave me brainfreeze.

Magic Banana

I am a member!

Offline
Joined: 07/24/2010

The man page is more of a specification. See the actual documentation: https://www.gnu.org/software/findutils/manual/find.html

andyprough
Offline
Joined: 02/12/2015

That's an incredibly thorough manual. MacKenzie and Youngman have done a great bit of work there.

RootFarmer
Offline
Joined: 08/24/2020

Cool, thanks! Documentation's great!

hailert
Offline
Joined: 10/21/2020
RootFarmer
Offline
Joined: 08/24/2020

I cant understand this one
find -exec sh -c ’something "$@" ’ sh {} \;
Why they calling sh twice? Its like 2 sh processes or just one?

RootFarmer
Offline
Joined: 08/24/2020

How to restrict users to allow them to only use letters and digits in file names?

Magic Banana

I am a member!

Offline
Joined: 07/24/2010

What is your actual problem? The syntax "$@" you gave in your previous post is usually a solution.

RootFarmer
Offline
Joined: 08/24/2020

Okay

RootFarmer
Offline
Joined: 08/24/2020

POSIX is dumb, why follow it?

Magic Banana

I am a member!

Offline
Joined: 07/24/2010

Compatibility. If it is truly dumb, it is not followed by default. At least not by GNU: https://www.gnu.org/prep/standards/standards.html#Compatibility