Find Files Using Name in Current Directory

Find Files Using Name in Current Directory

linux

Find all the files whose name is “wp-config.php” in a current working directory.

# find /home -name wp-config.php 
/home/tamanna/public_html/wp-config.php
/home/nissiwoo/public_html/wp-config.php
/home/blavycom/public_html/wp-config.php
/home/kalkikal/public_html/wp-config.php
/home/pixelsol/public_html/wp-config.php
/home/rahultwe/public_html/wp-config.php

This command result all wordpress sites hosted in server.

Find all the files whose name is del.php and contains both capital and small letters in /home directory.

# find /home -iname del.php
/home/mkbatman/public_html/sms/del.php
/home/webtvre/public_html/wrxzm/upiiy/Del.php

Find all php files in a directory.

 # find . -type f -name "*.php"
./rvadmin/autopublish.php
./rvadmin/bin/buildspriteimage/buildsprite.php
./rvadmin/bin/buildspriteimage/buildtest.php
./rvadmin/cp2whm.php
./php/PEAR5.php

About Annie

I've been working in Technical Section for over 10 years in a wide range of tech jobs from Tech Support to Software Testing. I started writing blog for my future reference and useful for all.