1.1 Find - Command
1.1 Find - Command
The Linux Find Command is one of the most important and much used command in Linux
systems. Find command used to search and locate list of files and directories based on
conditions you specify for files that match the arguments. Find can be used in variety of
conditions like you can find files by permissions, users, groups, file type, date, size and
other possible criteria.
The find command is available on most linux distros by default so you do not have to install
any package. The find command is an essential one to learn, if you want to get super
productive with the command line on linux.
2
1. Find Files Using Name in Current Directory
Find all the files whose name is technology.txt in a current working directory.
Find all the files under /home directory with name technology.txt.
3
4. Find Directories Using Name
Find all xyz files whose name is technology.xyz in a current working directory.
4
7. Find Files With 777 Permissions
5
10. Find Executable Files
Find all 777 permission files and use chmod command to set permissions to 644.
Find all 777 permission directories and use chmod command to set permissions to 755.
6
13. Find and remove single File
To find and remove multiple files such as .mp3 or .txt, then use.
7
15. Find all Empty Files
8
17. Find all Files Based on User
To find all files that belongs to user Tecmint under /home directory.
# find / -mtime 50
9
19.Find Last 50 Days Accessed Files
# find / -atime 50
10
21. Find Modified Files in Last 1 Hour
11
24. Find Size between 50MB – 100MB
To find all the files which are greater than 50MB and less than 100MB.
To find all 100MB files and delete them using one single command.
Find all .mp3 files with more than 10MB and delete them using one single command.
12
Find Top Running Processes by Highest Memory and CPU Usage in Linux
13
Find Top Running Processes by Highest Memory and CPU Usage in Linux
14