India Broadband Forum


Limit search to specific dir level using mindepth & maxdepth

This is a discussion on Limit search to specific dir level using mindepth & maxdepth within the Linux forums, part of the Operating Systems category; Limit Search To Specific Directory Level Using mindepth and maxdepth Find the passwd file under all sub-directories starting from root ...

Go Back   India Broadband Forum > Computers > Operating Systems > Linux

India Broadband Forum


                      

Reply

 

LinkBack Thread Tools Display Modes
Old 07-17-09, 12:24 PM   #1
Junior Member
 
Join Date: Jul 2009
Posts: 16
Rep Power: 1
vasudha is on a distinguished road
Default Limit search to specific dir level using mindepth & maxdepth

Limit Search To Specific Directory Level Using mindepth and maxdepth

Find the passwd file under all sub-directories starting from root directory.

# find / -name passwd
./usr/share/doc/nss_ldap-253/pam.d/passwd
./usr/bin/passwd
./etc/pam.d/passwd
./etc/passwd

Find the passwd file under root and one level down. (i.e root — level 1, and one sub-directory — level 2)

# find -maxdepth 2 -name passwd
./etc/passwd


Find the passwd file under root and two levels down. (i.e root — level 1, and two sub-directories — level 2 and 3 )

# find / -maxdepth 3 -name passwd
./usr/bin/passwd
./etc/pam.d/passwd
./etc/passwd


Find the password file between sub-directory level 2 and 4.

# find -mindepth 3 -maxdepth 5 -name passwd
./usr/bin/passwd
./etc/pam.d/passwd
vasudha is offline   Reply With Quote
Reply

Tags
dir, level, limit, search, specific

Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
what would be monthly bill if i dont cross the DL limit and calls limit in home500c+ kir_141988 BSNL broadband 7 09-18-08 03:08 PM
Disconnection for a specific time frame hans_net MTNL broadband 0 07-31-08 02:29 AM
I Can't access a specific website from my computer ,,, aqi_g BSNL broadband 2 06-21-08 10:44 AM
Location specific d/l speeds.. TOR BSNL broadband 2 01-24-08 05:41 PM
Microsoft launches Live Search Books to take on Google Book Search Admin News from the Tech and IT World 0 12-08-06 08:14 PM


All times are GMT +5.5. The time now is 05:54 PM.


India Broadband Forum