[bug #46791] wishlist: no option to find devices for major/minor

raf <[email protected]>
Newsgroups gmane.comp.gnu.findutils.bugs
Message-ID <[email protected]>
Follow-up Comment #4, bug #46791 (group findutils):

That debian bug report is 18 years old and didn't get much love.

You could instead use my rawhide (rh) program (an alternative to find(1)). It
is mentioned in the debian bug report you refer to. rh can include major/minor
device numbers in its search criteria. For example, if you want to find all
mountpoints to a specific device (named "/dev/specific" here), then something
like this should do the trick:

    rh / 'dev == "/dev/specific".dev'

Note that "dev" combines "major" and "minor" which could alternatively be used
separately. "dev" combines them into a single number in whatever way makes
sense for the current platform (struct stat's st_dev field).

But that would find all paths on that device (not just the mountpoint). If you
want to only find the mountpoint, you would need to include "prune" or (more
probably) "trim":

    rh / 'dev == "/dev/specific".dev && trim'

Rawhide is at:

    https://raf.org/rawhide
    https://github.com/raforg/rawhide
    https://codeberg.org/raforg/rawhide



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?46791>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCZ2puqQAKCRCqLAuaBUf3
TpiDAQC1zDziO75ejwsFkKKMXWeDCogr0ORrrkMBTzSzjJlumgEAn+V75cGjLI94
zLukV8485PWK0mEj2xGxUloc3j4SBwk=
=4CwC
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.