This document is a WORK IN PROGRESS.
This is just a quick personal cheat sheet: treat its contents with caution!
Find¶
find
is a tool to search for files in a directory hierarchy.
Reference(s)
$ man find
Table of contents¶
Use¶
search based on symlinks¶
- Print the list of all the broken symbolic links in the current directory:
search based on file or folder name¶
-
Search files or directories containing
string
in it's name: -
Search files containing
string
in their name (case insensitive): -
Search files ending with
.test
in their name: -
Search files containing
orstring
in their name, but nottest
: -
Search files containing
string
orgnirts
in their name, but nottest
ortset
: -
Search files containing
string
in their name, but not in thedir
folder -
Search files containing
string
in their name, but not in thedir
and therid
folder
search based on file size¶
-
Search files smaller than 2 Mo:
-
Search files bigger than 1 Go:
-
Search files bigger than 1 Ko and smaller than 5 Ko:
search based on file rights¶
-
Search executable files:
-
Search
644
files: -
Search files that are not
755
:
search based on file content¶
- Search files containing
string
in their name andplop
in their content:
search based on folder location¶
-
Search files containing
string
in their name, not farther than 2 levels of directories below: -
Search files containing
string
in their name, at least farther than 2 levels of directories below:
search based on owner and/or group¶
-
Search files containing
string
in their name, belonging to the groupgroup-name
: -
Search files containing
string
in their name, belonging to the useruser-name
:
tips and tricks¶
- Search all the broken symlinks of your system:
You should not blindly delete all broken symbolic links, as some of them serve a purpose.
If this cheat sheet has been useful to you, then please consider leaving a star here.