The most common use of find is in the search for a specific file by use of its name. These options can involve a search by name, by size, by access time or can also involve actions taken upon these files. The option refers to one or a series of options which effect the overall option of the find command. The option refers to the particular location that you wish to search, whether it be your $HOME directory, a particular directory such as /usr, your present working directory which can simply be expressed as '.' or your entire computer which can be expressed as '/'. -P : Never follow symbolic links: the default option.-H : Do not follow symbolic links, except while processing the command line arguments.The 3 options are not commonly seen but should at least be noted if only to realise that the -P option will be the default unless another option is specified: 3 seconds (on second run, when cache is effective) on a 500 GB ext4-fs hard disk.įind find works incredibly fast on the second run! You can search the whole / root-dir-tree in a mere approx. Will find this file below the home directory. You would run updatedb before using locate, which relies on the data produced by "updateDB". "find", like "locate", can find database-files as well, but "locate" is more specialized for this task. Hopefully locate and updatedb will be covered on their own page in the near future. This wiki page will be only be dealing with find while also briefly mentioning xargs. Xargs - build and execute command lines from standard input - usually you do this directly w/o xargs Updatedb - update a file name database, i.e. Locate - list files in databases that match a pattern, i.e. findutils is actually made up of 4 utilities:įind - search for files in a directory hierarchy, whether its a database or not The GNU find command is part of the GNU findutils and is installed on every Ubuntu system. By default find prints the name of the located files but it can also perform commands on these files. The GNU find command searches files within a directory and its subdirectories according to several criteria such as name, size and time of last read/write.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |