Finding files or directories

by Sanju 2009-11-11 16:04:19

Finding files or directories

To locate the file 'filename', searching all the subdirectories of the current directory:

find . -name 'filename'



You can use a pattern in place of 'filename', e.g. to return the list of all .doc files in the current directory and its subdirectories:

find . -name '*.doc'



The 'find' command can do much more. For example, to find the files that were accessed yesterday:

find ~ -daystart -type f -atime 1



Consult 'info find' for more information.

Tagged in:

1081
like
0
dislike
0
mail
flag

You must LOGIN to add comments