[clug] command of the hour

David Tulloh david at tulloh.id.au
Thu Feb 5 03:26:34 GMT 2009

Carlo Hamalainen wrote:
> On Wed, Feb 4, 2009 at 1:42 PM, Kim Holburn <kim at holburn.net> wrote:
>> I just put in a new hard disk, as you do, and was googling around to find
>> out how to work out what device it had ended up as, as you do, and after
>> trying cat /proc/partitions which worked well, discovered: lshw.  As in
>> "lshw -C disk".  Awesome.  Tells you lots of other useful things too.
> Also:
> $ ls -l /dev/disk/by-id
> Those IDs are handy. I have this line in my fstab:
> /dev/disk/by-id/usb-SAMSUNG_HD400LD_0-0:0-part1 /media/externalhdd
> auto defaults,user 0 0
> so my external hard drive always turns up in the same spot regardless
> of whether a USB stick is plugged in. The no worries with
> rsnapshot/unison going to the wrong place.
You can also use UUID.
UUID=ef05769b-fcb9-4fec-839d-0cab927b0f74 /boot ext3
defaults,noatime,noauto 0 2

It's also handy for identifying partitions in mdadm.  I'd never thought
about using it for usb devices though.


More information about the linux mailing list