"find" problem

Cameron Simpson cs at zip.com.au
Sat Jan 7 01:11:34 UTC 2012


On 06Jan2012 15:50, Dean S. Messing <deanm at sharplabs.com> wrote:
| On 06 January, 2012 at 3:47pm, Cameron Simpson wrote:
| > On 06Jan2012 12:43, Dean S. Messing <deanm at sharplabs.com> wrote:
| > | On my F13 machine, 
| > | 
| > |       find / \! -fstype ext4 -prune -o -print
| > | 
| > | prints every file that is in an ext4 filesystem mounted on /, and prunes
| > | those in any other type of fs.
| > | 
| > | On my F15 the same command prints nothing.  Why might that be?
| > 
| > Is / an ext4 fs? If not, the find will terminate immediately.
| > I would run the find with a -print before the -prune and withjout th
| > trailing print - see what the find is pruning.
| 
| 
| Yes it is: 
| 
| # mount | grep lv_root
| /dev/mapper/vg00-lv_root on / type ext4 (rw,relatime,user_xattr,acl,barrier=1,stripe=32,data=ordered)

Ok, so per my test suggestion, what does:

  find / \! -fstype ext4 -print -prune

show?

Is it useful to go:

  find / \! -type d -fstype ext4 -print -prune

What does "man find" say about the -fstype test? I haven't an F15 box to
hand to check against. Does that paragraph differ from the man on F13?

Cheers,
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

Surely it was of this place, now Cambridge but formerly known by the name of
Babylon, that the prophet spoke when he said, 'the wild beasts of the desert
shall dwell there, and their houses shall be full of doleful creatures, and
owls shall build there, and satyrs shall dance there.'
        - Thomas Gray (1716-1771)


More information about the users mailing list