Simple Linux Find Commands - Finding Names
- Details
Article Index
Page 2 of 6
1. Find Files Using Name in Current Directory
Find all the files whose name is lost.txt in a current working directory.
# find . -name lost.txt ./lost.txt
2. Find Files Under Home Directory
Find all the files under /home directory with name lost.txt.
# find /home -name lost.txt /home/lost.txt
3. Find Files Using Name and Ignoring Case
Find all the files whose name is lost.txt and contains both capital and small letters in /home directory.
# find /home -iname lost.txt ./lost.txt ./lost.txt
4. Find Directories Using Name
Find all directories whose name is lost in / directory.
# find / -type d -name lost /lost
5. Find PHP Files Using Name
Find all php files whose name is lost.php in a current working directory.
# find . -type f -name lost.php ./lost.php
6. Find all PHP Files in Directory
Find all php files in a directory.
# find . -type f -name "*.php" ./lost.php ./login.php ./index.php
Related
-
email forwarding to gmail from your mail server
12 January 2021
I wrote this for myself. Since I have no memory, I write everything down. If it helps you -- great. if you run into problems GTS. I have no answers. I have postfix mapped to a... -
29 December 2018
Linux Directories Explained -
22 February 2018
PHP Redirect in joomla index -
08 January 2014
Pipes -
08 January 2014
grep
More in Coding