[ale] Ale Digest, Vol 41, Issue 126

Andrew Sledge andrew at novologic.com
Sun Jun 26 20:04:12 EDT 2011


If you're using Ubuntu.

The simple answer is to just give the drive a label. Then it will mount at
/media/<LABEL>. It's using the UUID of the drive probably because you don't
have a label.

Here's how to assign a label:
https://help.ubuntu.com/community/RenameUSBDrive

I cannot imagine the other distros being too much different.

On Sun, Jun 26, 2011 at 4:02 PM, <ale-request at ale.org> wrote:

> Date: Sun, 26 Jun 2011 15:58:16 -0400
> From: John Pilman <jcpilman at gmail.com>
> Subject: [ale] BASH question
> To: Atlanta Linux Enthusiasts <ale at ale.org>
> Message-ID: <BANLkTikEdAeg6N4cUGE4TSYLsy0ogXpLFA at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> I want to write a shell script or alias to allow me to cd to a
> particular directory more easily.
>
> When I plug in a flash drive, it gets mounted automatically in
> /media/102B-1B76, only the last nine characters are not always the
> same.  Since usually there is only one directory in /media I want a
> command that will cd to that directory.
>
> I tried
> /media$ find . -mindepth 1 -type d -prune|sed 's:./::'|xargs cd
> but I get
> xargs: cd: No such file or directory
> however
> /media$ find . -mindepth 1 -type d -prune|sed 's:./::'
> returns
> 102B-1B76
>
> I have also tried the -print0 option, but without further success.
> Any ideas?
> ...John
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20110626/5c58c689/attachment-0001.html 


More information about the Ale mailing list