How to handle those "smart" device names at the CLI?
Johnny Rosenberg
gurus.knugum at gmail.com
Sat May 14 13:04:00 UTC 2011
2011/5/14 Thierry de Coulon <tcoulon at decoulon.ch>
>
> Hello all,
>
> I use an external USB drive for backup purposes. I use Image for Linux for
> this, where I have to hand mount my backup partition as root. The result is
> that the backup files are owned by root.
>
> When I plug the drive in Ubuntu, it gets automounted as something like:
> /dev/sde1 on /media/4ae56680-7468-493e-aa40-9bb6c79f00f7 type ext3
>
> What's the smart way of accessing it from a terminal? I don't seem to be able
> to type this sort of "code" correctly
Why is that? Works for me. In the case above I would type the
following to change to that directory, where ”⇥” means the ”↹” key
(TAB):
cd /me⇥4⇥
(/me⇥ will be auto-completed to /media/ and 4⇥ will hopefully be
auto-completed to ”4ae56680-7468-493e-aa40-9bb6c79f00f7”. If not, just
add one or a few more characters, 4a⇥).
But, as some people already suggested, maybe you would rather prefer
to use e2label to give it a label that makes sense to you in the first
place, like this example:
sudo e2label /dev/sde1 Backup
To just check the current label, try:
sudo e2label /dev/sde1
By the way, here's a useful trick, not directly related to this subject though:
If you run a command that need to be run as root, and you forget to
type ”sudo”, you don't need to type the whole command again and you
don't even need to use the ↑ key for editing the last command. All you
need to do is to type:
sudo !!
Looks something like this:
$ e2label /dev/sdb1
e2label: Access denied when trying to open /dev/sdb1
Couldn't find valid filesystem superblock.
$ sudo !!
sudo e2label /dev/sdb1
Backup
$
Regards
Johnny Rosenberg
ジョニー・ローゼンバーグ
More information about the ubuntu-users
mailing list