os:find
Return to Home page
If you found any error, or if you want to partecipate to the editing of this wiki, please contact: admin [at] skenz.it
You can reuse, distribute or modify the content of this page, but you must cite in any document (or webpage) this url: https://www.skenz.it/os/find?do=diff&rev2%5B0%5D=1573835417&rev2%5B1%5D=1574111352&difftype=sidebyside
Differences
This shows you the differences between two versions of the page.
— | os:find [2024/04/08 22:35] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== The find command ====== | ||
+ | Return to [[os: | ||
+ | |||
+ | < | ||
+ | <iframe width=" | ||
+ | </ | ||
+ | |||
+ | Examples about the '' | ||
+ | |||
+ | * Find all the files, starting from the current working directory and using the '' | ||
+ | <code bash> | ||
+ | find . -name " | ||
+ | </ | ||
+ | |||
+ | * Find, using the '' | ||
+ | <code bash> | ||
+ | find . -regex " | ||
+ | </ | ||
+ | |||
+ | * Find all the files, starting from the current working directory and using the '' | ||
+ | <code bash> | ||
+ | find . -regex " | ||
+ | </ | ||
+ | |||
+ | * Find all the regular files in the current working directory whose name starts with an '' | ||
+ | <code bash> | ||
+ | find . -type f -iname " | ||
+ | find . -type f -regex " | ||
+ | </ | ||
+ | |||
+ | * Find all the regular files starting from the parent of the current working directory, whose name contains two lower case '' | ||
+ | <code bash> | ||
+ | find . -type f -regex " | ||
+ | </ | ||
+ | |||
+ | * Find all the regular files starting from the home directory which have not the '' | ||
+ | <code bash> | ||
+ | find ~ -type f ! -perm 777 | ||
+ | </ | ||
+ | |||
+ | * Find all the directories starting from the root of the file system which have the '' | ||
+ | <code bash> | ||
+ | find / -type d -perm 777 -exec chmod 755 \{} \; | ||
+ | </ | ||
+ | |||
+ | * Find all the regular files starting from the current working directory whose name has extension .txt, and remove then | ||
+ | <code bash> | ||
+ | find . -type f -name " | ||
+ | </ | ||
+ | |||
+ | * Find all the regular files starting from the ''/ | ||
+ | <code bash> | ||
+ | find /tmp -type f -empty | ||
+ | </ | ||
+ | |||
+ | * Find all the elements starting from the current working directory, whose name is '' | ||
+ | <code bash> | ||
+ | find . -regextype posix-extended -regex " | ||
+ | </ | ||
+ | |||
+ | * Find all the elements starting from the directory ''/ | ||
+ | <code bash> | ||
+ | find /home -user stefano -iname " | ||
+ | </ | ||
+ | |||
+ | * Find all the elements starting from the directory ''/ | ||
+ | <code bash> | ||
+ | find /home -group developer | ||
+ | </ | ||
+ | |||
+ | * Find all the elements starting from the root of the file system with size greater than 50 Megabytes and lower than 100 Megabytes | ||
+ | <code bash> | ||
+ | find / -size +50M -size -100M | ||
+ | </ | ||
+ | |||
+ | * Find all the regular files starting from the root of the file system whose name has extension '' | ||
+ | <code bash> | ||
+ | find / -type f -name " | ||
+ | </ | ||
+ | |||
+ | * Find all the regular files starting from the current working directory, whose name has extension '' | ||
+ | <code bash> | ||
+ | find . -type f \( -name " | ||
+ | </ | ||
+ | |||
+ | * Find all the regular files starting from the current working directory, whose name finishes with the string '' | ||
+ | <code bash> | ||
+ | find . -type f \( -name " | ||
+ | </ | ||
+ | |||
+ | * Find all the elements in the home directory with the modification date more recent than 1440 minutes (one day) | ||
+ | <code bash> | ||
+ | find ~ -mmin -1440 | ||
+ | </ | ||
+ | |||
+ | * Find all the elements in the home directory with the modification date more recent than one day (as previous command) | ||
+ | <code bash> | ||
+ | find ~ -mtime -1 | ||
+ | </ | ||
+ | |||
+ | * Find all the elements in the home directory with the modification date between 10 and 14 days | ||
+ | <code bash> | ||
+ | find ~ -type f -mtime +10 -mtime -14 | ||
+ | </ | ||
If you found any error, or if you want to partecipate to the editing of this wiki, please contact: admin [at] skenz.it
You can reuse, distribute or modify the content of this page, but you must cite in any document (or webpage) this url: https://www.skenz.it/os/find?do=diff&rev2%5B0%5D=1573835417&rev2%5B1%5D=1574111352&difftype=sidebyside
/web/htdocs/www.skenz.it/home/data/pages/os/find.txt · Last modified: 2024/04/08 22:35 by 127.0.0.1