Linux find command
Translation results:
find
英[faɪnd] 美[faɪnd]
v.find;discover;find out;discover
n.find something ;The person who was found
Third person singular: finds Present participle: finding Past tense: found Past participle: found
Linux find commandsyntax
Function: The find command is used to find files in the specified directory.
Syntax: find path -option [ -print ] [ -exec -ok command ] {} \;
Linux find commandexample
List all files with file extension c in the current directory and its subdirectories.
# find . -name "*.c"
List all general files in the current directory and its subdirectories
# find . -type f
List all files in the current directory and its subdirectories that have been updated in the last 20 days
# find . -ctime -20
Find ordinary files in the /var/log directory that were changed more than 7 days ago, and ask them before deleting:
# find /var/log -type f -mtime +7 -ok rm {} \;
The owner of the file in the directory before searching has read and write permissions, and the group to which the file belongs Files that the user and other users have read permission for:
# find . -type f -perm 644 -exec ls -l {} \;
To find all normal files with file length 0 in the system and list their full paths:
# find / -type f -size 0 -exec ls -l {} \;
Popular Recommendations
- Oppo Find X8 will be smaller than the Find X7 but pack a bigger battery
- Find the Length of the Longest Common Prefix
- How to Find Which iPad Model You Have
- Where to find all Destiny 2 10th Anniversary armor
- XRP Status in Trouble Again? Let's Find Out the Odds
- How to Find Warhammer 40K Space Marine 2 Save File Location