# to search for a file on Linux using name
# find /datadump -name abc.txt
This command will search for all files located in /datadump filesystem
Find files ignoring case
find /datadump-iname abc.txt
Find Directories Using Name
find / -type d -name datadump
Find Files With 777 Permissions
# find . -type f -perm 0777 -print
Find Files Without 777 Permissions
# find / -type f ! -perm 777
Find Read Only Files
# find / -perm /u=r
Find Executable Files
# find / -perm /a=x
Find all Empty Files
# find /datadump -type f -empty
Find all Empty Directories
# find /datadump -type d -empty
File all Hidden Files
# find /datadump -type f -name ".*"
Find Last 50 Days Modified Files
# find / -mtime 50
Find Last 50 Days Accessed Files
# find / -atime 50
Find Last 50-100 Days Modified Files
# find / -mtime +50 –mtime -100
Find Changed Files in Last 1 Hour
# find / -cmin -60
Find Modified Files in Last 1 Hour
# find / -mmin -60
Find Accessed Files in Last 1 Hour
# find / -amin -60
Find 50MB Files
# find / -size 50M
Find Size between 50MB – 100MB
# find / -size +50M -size -100M
# find /datadump -name abc.txt
This command will search for all files located in /datadump filesystem
Find files ignoring case
find /datadump-iname abc.txt
Find Directories Using Name
find / -type d -name datadump
Find Files With 777 Permissions
# find . -type f -perm 0777 -print
Find Files Without 777 Permissions
# find / -type f ! -perm 777
Find Read Only Files
# find / -perm /u=r
Find Executable Files
# find / -perm /a=x
Find all Empty Files
# find /datadump -type f -empty
Find all Empty Directories
# find /datadump -type d -empty
File all Hidden Files
# find /datadump -type f -name ".*"
Find Last 50 Days Modified Files
# find / -mtime 50
Find Last 50 Days Accessed Files
# find / -atime 50
Find Last 50-100 Days Modified Files
# find / -mtime +50 –mtime -100
Find Changed Files in Last 1 Hour
# find / -cmin -60
Find Modified Files in Last 1 Hour
# find / -mmin -60
Find Accessed Files in Last 1 Hour
# find / -amin -60
Find 50MB Files
# find / -size 50M
Find Size between 50MB – 100MB
# find / -size +50M -size -100M
Tags:
Linux