Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement
next up previous contents index
Next: Tests Up: findthe file searcher Previous: Expressions

Options

Here there is the list of all options known by GNU version of find. Remember that they always return true.

  • -daystart measures elapsed time not from 24 hours ago but from last midnight. A true hacker probably won't understand the utility of such an option, but a worker who programs from eight to five does appreciate it.
  • -depth processes each directory's contents before the directory itself. To say the truth, I don't know many uses of this, apart for an emulation of rm -F command (of course you cannot delete a directory before all files in it are deleted too ...
  • -follow deferences (that is, follows) symbolic links. It implies option -noleaf; see below.
  • -noleaf turns off an optimization which says ``A directory contains two fewer subdirectories than their hard link count''. If the world were perfect, all directories would be referenced by each of their subdirectories (because of the .. option), as . inside itself, and by it's ``real'' name from its parent directory.

    That means that every directory must be referenced at least twice (once by itself, once by its parent) and any additional references are by subdirectories. In practice however, symbolic links and distributed filesystemsgif can disrupt this. This option makes find run slightly slower, but may give expected results.

  • -maxdepth levels, -mindepth levels, where levels is a non-negative integer, respectively say that at most or at least levels levels of directories should be searched. A couple of examples is mandatory: -maxdepth 0 indicates that it the command should be performed just on the arguments in the command line, i.e., without recursively going down the directory tree; -mindepth 1 inhibits the processing of the command for the arguments in the command line, while all other files down are considered.
  • -version just prints the current version of the program.
  • -xdev, which is a misleading name, instructs find not to cross device, i.e. changing filesystem. It is very useful when you have to search for something in the root filesystem; in many machines it is a rather small partition, but a find / would otherwise search the whole structure!


next up previous contents index
Next: Tests Up: findthe file searcher Previous: Expressions

Converted on:
Mon Apr 1 08:59:56 EST 1996
Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.