search
  • Sign In
  • Sign Up
Password reset successful

Follow the proiects vou are interested in andi aet the latestnews about them taster

Programming Dictionary

Online technical manual for service programmers
Popular searches:
Dictionary homepage Server Linux Linux find command
Linux find command Detailed instructions for use

Linux find command

Chinese translation Recent Updates: 2018-06-13 09:25:14

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 command syntax

Function: The find command is used to find files in the specified directory.

Syntax: find path -option [ -print ] [ -exec -ok command ] {} \;

Linux find command example

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 {} \;
Linux find command