find [Command]

find [Command]



Command find

find – command displays a list of files that match a given set of criteria.

Syntax

find [path] [options]

Options

-depth first processing the current directory, then its subdirectories.
-maxdepth n restricts the search to n levels of subdirectories.
-follow processes the directories specified with symlinks.
-name pattern of files with names matching a pattern.
-ctime n compares the files modified exactly n days ago.
-user name find files owned by the specified user.
-group is the name of the files owned by these groups.
-path pattern finds files with paths matching a pattern.
-perm law finds files with the specified access rights.
-size+nK finds files with size more than n kilobytes.
-type x finds files of a given type, where x – is one of the following types:
         f compares the files
         d compares directories
         l compares the symbolic links.
-print prints the names of found files.
-exec command [options] () \; executes the specified command, passing it the name file found.

Description

The find command is useful for finding all files that match a given set of criteria. If you enter find no arguments will display a list of all files in all subdirectories of the current directory. To display all files with names ends with a. gz, type find . -name “.gz”

Leave a Reply

Your email address will not be published. Required fields are marked *