Finding a file on local disc drives on Linux

(imported topic written by

I’d need to search for a specific file on a Linux system. However for performance reasons I want to search on local disc drives/filesystems only. I got the single pieces together (I think at least) but got stuck in combining these.

To search for a file on the whole system I can use the following code:

find file "inittab" of (descendant folders of root folder)

The mount points of the local filesystems I get via the following relevance expression:

names of it of (filesystems whose (type of it is "DRIVE_FIXED"))

No I want to limit the

find file "inittab" of ..

so that only the folders on local filesystems are searched.

Thanks a lot in advance for any advice how the relevance expression should be written.


(imported comment written by SystemAdmin)

Hello Hermann,

maybe this answers your question:

find file “inittab” of (descendant folders of (folders (names of (filesystems whose (type of it is “DRIVE_FIXED”)))))

But - as Martin pointed out - still with this query it will look into all subfolders of / so will not be very useful…

Q: folders (names of (filesystems whose (type of it is “DRIVE_FIXED”)))

A: /

A: /proc

A: /sys

A: /dev/pts

A: /boot

A: /dev/shm

A: /proc/sys/fs/binfmt_misc

A: /proc/fs/vmblock/mountPoint

A: /var/lib/nfs/rpc_pipefs

T: 214