Sunday, March 20, 2016

Find Command Usage

Find Command Usage

full command

#find / -name foo.txt -type f -print

Find all directories whose name is Tecmint in / directory.

# find / -type d -name Tecmint

To file all empty files under certain path.

# find /tmp -type f -empty

To file all empty directories under certain path.

# find /tmp -type d -empty

To find all hidden files, use below command.

# find /tmp -type f -name ".*"

To find all the files which are changed in last 1 hour.

# find / -cmin -60

To find all the files which are modified in last 1 hour.

# find / -mmin -60

To find all the files which are accessed in last 1 hour.

# find / -amin -60

To find all 50MB files, use.

# find / -size 50M

Find all directories

# find . -type d

Find only the normal files

# find . -type f

Find all the hidden files

# find . -type f -name ".*"

Find all the hidden directories

# find -type d -name ".*"








No comments:

Post a Comment