Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Restrict traverse of find command to 2 subdirectories only.

DrBugsMar 30 2008 — edited Mar 31 2008
Find the files that are older than 90 days under the directories /f001,/f002,/f003 and traverse only 2 subdirectory levels.

The following statement traverses all directories and subdirectories, how do I restrict the traverse to two subdirectories only?

find /f001 -type f -mtime +90 -exec ls -ld {} \;
find /f002 -type f -mtime +90 -exec ls -ld {} \;
find /f003 -type f -mtime +90 -exec ls -ld {} \;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 28 2008
Added on Mar 30 2008
4 comments
3,963 views