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 ...
| |||||||
| | #1 |
| Junior Member Join Date: Jul 2009
Posts: 16
Rep Power: 1 | 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 |
| | |
| Tags |
| dir, level, limit, search, specific |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| 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 |