To find all files ending with .html:
find / -name \*.html -print
The character causes the shell to ignore the following character, in this case an asterisk. To find a file that starts with project:
find / -name project\* -print
Multiple wildcards can be used in the same find command. The following command finds all files with the word maybe in it:
find / -name \*maybe\* -print
The backslash \ character is important. It tells the shell not to treat the wildcard character as a wildcard when interpreting the command line arguments.
To find all empty files on the entire system,
find / -size 0 -print
To find all empty files from the current directory down,
find . -size 0 -print
To find all empty files on the entire system,
find / -size 0 -print
To find all empty files from the current directory down,
find . -size 0 -print
To find all files with zero length and ask if they should be deleted:
find / -size 0 -ok rm {} \;
The backslash \ is important because it tells the shell to ignore the semicolon symbol which usually separates commands on a single command line.
