LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 0
Refer to SD Drive Location


Hi,

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,
Tom
 
Old 06-01-2010, 09:21 AM   #2
amani
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, 11:46 AM   #3
smoker
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.
http://reactivated.net/writing_udev_rules.html

Fedora now uses udevadm not udevinfo.

Open a terminal and run
Code:
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.
 
  


Reply



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 08:02 AM
DVD-ROM Drive Location Slayer097 Linux - Newbie 7 02-23-2005 12:52 PM
Drive location help ranciddwarf Linux - General 4 08-22-2004 05:34 PM
changing hard drive location thelight1 Linux - Hardware 3 10-12-2003 06:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:15 PM.

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