How to use find command in linux

HOW TO USE FIND COMMAND IN LINUX

Find Command:
“find” command is used to find the files or directory’s path,
It is exactly like the find option in windows where you can search for a file.
Syntax: find / (under root) -option file-name
OPTION USAGE
name  For searching a file with its name
inum  For searching a file with particular inode number
type    For searching a particular type of file
user    For files whose owner is a particular user
group For file belonging to particular group
Example: 1
# find / -name sample
Example: 2
# find / -inum 14402
Example: 3
# find /home/rhel6 -type f
File is of type c:
b – block (buffered) special
c – character (un buffered) special
d – directory
p – named pipe (FIFO)
f – regular file
l – symbolic link; t
s – socket
Example: 4
# find /home/ -user rhel6
Example: 5
# find /home/rhel6 -group rhel6
 HOW TO USE FIND COMMAND IN LINUX AND UNIX

Related posts

Leave a Comment