Linux Server and Workstation Configuration How To

  • Decrease font size
  • Default font size
  • Increase font size
  • default color
  • red color
  • green color
find PDF Print E-mail
Monday, 14 December 2009 19:10
AddThis Social Bookmark Button

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"

 

Add comment


Security code
Refresh

Useful Links

Follow us on ...

  • Digg: hgevs
  • Facebook Page: 180986722511
  • Linked In Group: 2571120
  • Ning: linuxconfignet
  • Twitter: linuxconfignet

Friends

Thanks David Ayvazyan for provided useful information and discussions.
www.gnu.am (Armenian Translation)