Skip network filesystems when searching with find

by
Ryan
on
January 19, 2009

When you run the find command on the root directory of a system you may want to exclude all network filesystems and confine your search to only your local machine. The benefits of this are obvious as it will save you a great amount of time especially if the mounted filesystem is very large.

Luckily the find command provides this ability with the ‘-xdev‘ or ‘-mount‘ options.

For example:

$ find / -xdev -name myfile.txt

This command will recursively search for myfile.txt starting in your root directory and skip all externally mounted filesystems.

No Comments
system administration
, , , , , , ,

No related posts.

Comments (0)

No comments yet

Trackbacks (0)

No trackbacks yet

Leave a Comment

(displayed with your post)
(will not be published)
(optional)
Copyright 2008-2010 WiredRevolution.com. All rights reserved.