HostOnNet Blog

Find Files Using Name in Current Directory

Looking for Linux Server Admin or WordPress Expert? We can help.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.