Linux Find: Searching for a File or Directory
Last Updated by Code Sport. Filed under linuxFind: Searching for a File or Directory sudo find / -iname 'target_to_find'…
sudo find / -iname 'target_to_find' -type d
Where:
sudo
to search protected (root access only) files/
searches the whole file system while. This is the recommended parameter as usually you’re usually not sure which directory the file or sub-directory is located. .
searches within the current directory. ~/
searches the “home” directory (and below) of the user you are logged in as-iname
performs a case-insensitive search while -name
does the oppositetarget_to_find
stick between single quotes as a best practice-type
directive is optional and the default value is f
which searches for file names. d
searches for directory names