Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-01-2010, 09:44 AM   #1
LQ Newbie
Registered: Jun 2010
Posts: 10

Rep: Reputation: 0
Refer to SD Drive Location


I have written myself a small script to import my photos from my digital camera. The script copies all of the photos from my SD card into my pictures folder. At present the way I refer to the card is through its actual name ('16GB SD Media' or something similar). The problem arises if I use a different SD card, as it has a different device name.

Is there any way to reference the SD card slot as opposed to the specific SD card, so that it will work with any card inserted?

Thanks in advance,
Old 06-01-2010, 10:21 AM   #2
Senior Member
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
/media/disk can be the mount point

usually it is /dev/sdc1 if there are two hard disks

Better still use the info in /dev/disk
Old 06-01-2010, 12:46 PM   #3
Senior Member
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
You could try using udev to run the script when a card is inserted.

Fedora now uses udevadm not udevinfo.

Open a terminal and run
udevadm monitor
and then stick the card in. This will give the base path of the card and you can then use that info to query the attributes and build a rule.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Labelling(?) a usb drive so that it mounts in a unique location Ross Clement Linux - Hardware 5 11-23-2009 09:02 AM
DVD-ROM Drive Location Slayer097 Linux - Newbie 7 02-23-2005 01:52 PM
Drive location help ranciddwarf Linux - General 4 08-22-2004 06:34 PM
changing hard drive location thelight1 Linux - Hardware 3 10-12-2003 07:20 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:08 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration