How to handle those "smart" device names at the CLI?

Thierry de Coulon tcoulon at decoulon.ch
Sat May 14 15:22:31 UTC 2011


On Saturday 14 May 2011 03:04:00 pm Johnny Rosenberg wrote:
>
> 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

Thanks to all that made this suggestion. I never figured out that this was 
just a "label".

> 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
> ジョニー・ローゼンバーグ

Thanks Johnny. I'm fairly used to first becomming root before using this sort 
of command, but sudo!!  will certainly come handy some day soon :)

Thierry





More information about the ubuntu-users mailing list