How to find files in Linux

Submitted by str on Tue, 09/12/2006 - 10:30

This is how to find files in Linux assuming you know some little detail about it.

To find "myfile.txt" in the current directory and any subdirectory under the current one.

find -name 'myfile.txt'

To find for any file named "myfile.txt" on the root and all subdirectories from the root.

find / -name 'myfile.txt'

To find for any file beginning with "file" in the current directory and any subdirectory.

find -name 'file*'

To find for any file that is larger then 1000k.

find -name '*' -size +1000k

For complete options and other usage you can always check the man page of find.
man find

Related Items

Comments

Anonymous (not verified)

Fri, 07/03/2015 - 19:16

To find a file for example forgottenlogo.png somewhere; you can also use this:
1. Go to the parent folder (or root folder)
2. type find . -name '*logo*.png'