Friday, October 29, 2010

Usage of find command in redhat linux rhel5


Usage of find command in linux and Unix:

Find command is used to search dynamically in Linux systems. In this tutorial  we'll see various practical usage examples of find command. This examples are shown in a redhat enterprise Linux system. Same commands will work with other redhat distributions like Centos, Fedora etc and other distributions like ubuntu, debian as well.

The general syntax of find command is as follows.
#find [Directory] [criteria]

Directory is where we want to search
Criteria is what we are giving to search. Eg file name, user name, Inode number etc.

The following command will search a file with file name file_name in current working directory.
#find -name file_name