Use of find and -exec

# All before the 10th day, excluding the files on the 10th day

$ find -mtime +10 -exec rm -rfv {} \;

 

# 10 days ago, the file of the current day

$ find -mtime 10 -exec rm -rfv {} \;

 

# Within 10 days, including today's documents, but excluding the 10th day's documents

$ find -mtime -10 -exec rm -rfv {} \;

 

#Find files belonging to the user test in the system

$find / -user test

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326214502&siteId=291194637