The find command

Return to Operating Systems Course

Examples about the find Linux command

find . -name "aBcBa.txt"
find . -regex "\./aBcBa.txt"
find . -regex ".*/aBcBa.txt"
find . -type f -iname "a?a*.txt"
find . -type f -regex ".*/[aA].[aA][^/]*\.txt"
find . -type f -regex ".*a.a[^/]*\.txt"
find ~ -type f ! -perm 777
find / -type d -perm 777 -exec chmod 755 \{} \;
find . -type f -name "*.txt" -exec rm -f \{} \;
find /tmp -type f -empty
find . -regextype posix-extended -regex ".*/(x|y).txt"
find /home -user stefano -iname "*.txt"
find /home -group developer
find / -size +50M -size -100M
find / -type f -name "*.mp3" -size +10M -exec rm \{} \;
find . -type f \( -name "*.c" -o -name "*.sh" \)
find . -type f \( -name "*cache" -o -name "*xml" -o -name "*html" \) 
find ~ -mmin -1440
find ~ -mtime -1
find ~ -type f -mtime +10 -mtime -14