commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
most usefull when creating batch scripts using several usb drives and some commands like mkntfs needs a device name
the -w option for grep is here to filter lines when you have multiple drives with the same volume label. Without this option, the grep command will return
There are 16 alternatives - vote for the best!
No need for grep | awk. -P on df will force the mount point to be on the same line as the device
Reduced to only one command. :)
Shorter way to find the device for a given mountpoint
less ressources (processes) needed
If you can do better, submit your command here.
You must be signed in to comment.