To find files in Linux you can use the following commands:
$ find / -name 'search string'
/ = start searching from root directory
'search string' = name of the file (you can use wildcards) e.g. 'index.html' (find all index.html files withing root directory and all subdirectories)
or 'index.*' (find all index files - like index.html or index.htm or index.php - files withing root directory and all subdirectories)
or *ndex.* find all files containing string 'ndex' in their name (e.g. index.html. indexback.php preindex.html etc.)
$ find / -iname 'search string'
Same as above but with the search will be case insensitive.
$find -name 'search string'
Search will find files from the current directory and its subdirectories.
$ find / -name 'search string'
/ = start searching from root directory
'search string' = name of the file (you can use wildcards) e.g. 'index.html' (find all index.html files withing root directory and all subdirectories)
or 'index.*' (find all index files - like index.html or index.htm or index.php - files withing root directory and all subdirectories)
or *ndex.* find all files containing string 'ndex' in their name (e.g. index.html. indexback.php preindex.html etc.)
$ find / -iname 'search string'
Same as above but with the search will be case insensitive.
$find -name 'search string'
Search will find files from the current directory and its subdirectories.
No comments:
Post a Comment