Quote:
Originally Posted by frankbell
If I am, as my old boss used to say, "in error," I trust someone with straighten me out.
|
Ok, since you asked... a post like that after less than an hour is not constructive.
When a thread has no replies, it stays in the zero reply list - making it easier for people to find threads that have yet to be answered. Threads without replies get auto-bumped twice, to cater for different timezones.
When someone posts with a "I dunno" reply, it takes the thread out of that list and does not help the person asking for help, and - when done within an hour - reduces the number of people who might see it, and thus is even less helpful.
If someone
waits a few days and
then invokes Cunningham's Law, they can still enjoy looking foolish, but without reducing the number of people who see a thread and thus might be able to help the person asking.
(Hopefully this is all taken in the constructive manner intended, and also encourages other LQ users to consider if they should post immediately or to wait a few days before removing threads from the Zero Reply list.)
-
Anyhow, back to device names and UUIDs there are (at least) three options for getting a block device name from uuid:
Code:
blkid -U YOUR_UUID
findfs UUID=YOUR_UUID
findmnt UUID=YOUR_UUID
blkid - locate/print block device attributes
findfs - find a filesystem by label or UUID
findmnt - find a filesystem
(may be specified by device name, major:minor numbers, filesystem label or UUID, or partition label or UUID.)
None of them need grep.
The first two are in /sbin but - depending on permissions - it might be enough to use /sbin/blkid or /sbin/findfs to run as non-root user; or just use findmnt which doesn't
To go in the other direction, and output the UUID give a device name, neither of these options need root/sudo...
(Consult --help and/or the manpages for formatting and other available options.)