[Tfug] mount and umount a usb stick

Neil Short neshort at yahoo.com
Thu Sep 13 20:40:05 MST 2007


--- jblais <joe.blais at pti-instruments.com> wrote:

> Hello -
> 
> ....
> 
> Do USB sticks just show up wherever they want to?
> Is there enough 'magic' that the mount command will
> work no matter which USB
> port the stick is in (couldn't find anything in
> fstab) ?

No. Linux assigns a device identification when the USB
stick is inserted. It just assigns the next available
number. If, while your memory stick is in and assigned
to /dev/sdc you were to insert another memory stick
into a different USB plug, then Linux will assign the
new device to /dev/sdd. The next one after that will
be /dev/sde, and so on. The number at the end is an
indicator of which partition you wish to mount.
Generally, memory sticks have only one partition -
thus the identification of, for example, /dev/sdc1.

Your challenge is to have your script capture the
assigned device name from your system messages and
mount it accordingly.

======
Because sentence against an evil deed is not executed speedily, the human heart is fully set to do evil.
Ecclesiastes 8:11


      ____________________________________________________________________________________
Don't let your dream ride pass you by. Make it a reality with Yahoo! Autos.
http://autos.yahoo.com/index.html
 






More information about the tfug mailing list