Liam Delahunty: Home Tips Web Contact
Recommended laptop
under £500
.

Think I deserve a present? See my Amazon Wish List

Linux Find Exclude Directory

find . -path './media' -prune -o -print

Find all files in this directory (.)
-prune (ignore) the proceding path of
'./media'
Then if no match print (prune or print)

Linux Find Modified with certain time period with excluded directory

find . -path './media' -prune -o -mtime -30 -print

Find all files in this directory (.)
-prune (ignore) the proceding path of
'./media'
Modified within the last 30 days
print the results.

See also: Find - prune multiple directories.

Share this!