Linux find/search root partition ONLY?
Posted
by ~sd-imi
on Super User
See other posts from Super User
or by ~sd-imi
Published on 2010-06-11T13:02:43Z
Indexed on
2010/06/11
13:13 UTC
Read the original article
Hit count: 207
Say I need to do:
find / -name somefile.txt
and say root partition / is mounted on /dev/sda5; however, let's say I also have 250GB partitions (/dev/sda6, /dev/sda7) mounted in /media - AND another location that I cannot currently remember. Say, also, that I know the file I'm looking for is on /dev/sda5.
Obviously, the above command will also descend in /media and that other directory which represent the big partitions, wasting time in looking for the file in the wrong place.
Is there a way to instruct find (or other command) to search only / on /dev/sda5, and NOT to descend to directories if they are on different partitions ?
Thanks, Cheers!
© Super User or respective owner