Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Syncing folder from USB Stick< Next Oldest | Next Newest >
Zorak_asread Offline





Group: Members
Posts: 2
Joined: Feb. 2007
Posted: Feb. 09 2007,09:57 QUOTE

What I'm trying to accomplish is the following.

Assoon as I insert an USB Stick, I want DSL to automaitcly copy all the files from the stick to a folder on hda3.

Anybody got any Ideals how to do this, I figure through a script of some sort.

Thx :)
Back to top
Profile PM 
lucky13 Offline





Group: Members
Posts: 1478
Joined: Feb. 2007
Posted: Feb. 09 2007,14:18 QUOTE

Quote (Zorak_asread @ Feb. 09 2007,04:57)
What I'm trying to accomplish is the following.

Assoon as I insert an USB Stick, I want DSL to automaitcly copy all the files from the stick to a folder on hda3.

Anybody got any Ideals how to do this, I figure through a script of some sort.

Thx :)

I can think of several ways of doing it, but I'm left with more questions why I'd want to do that. Are you doing this via the CD, frugal, or hard drive install?

Are you going to be using multiple sticks? If just one stick, why not just mount in emelfm and copy everything by highlighting the whole stick? Are you willing to give up your use of all USB media strictly for this use? Or would you need a way to stop and start the automatic sudo mounting and copying * to hda3? Do you want it to overwrite things in the same directory on hda3 or go to new directories each time?

Personally, I don't think it's a good idea to automatically do something like that when it's easy enough to use something like emelfm as root, highlight, and copy; or even just use your bash history (up-arrow key) to mount/umount and cp. It's not going to save you that much time unless you're copying loads of sticks on a frequent basis. And it would render USB pretty much useless for other media unless you had a stop/start to the script.


--------------
"It felt kind of like having a pitbull terrier on my rear end."
-- meo (copyright(c)2008, all rights reserved)
Back to top
Profile PM WEB 
Zorak_asread Offline





Group: Members
Posts: 2
Joined: Feb. 2007
Posted: Feb. 09 2007,22:26 QUOTE

I'm creating a pictureframe PC. DSL installation with a folder in which I place my images. This machine isn't connected to any network, so what I want to do is just plug in my USB stick, and have this action result in the execution of a script that will copy over the new files from the stick to the harddisk, and then restart my image viewer so the new images are included in its filelist.

My problem is that I don't know how to get a script to run in response to the insertion of the USB stick. Suggestions?
Back to top
Profile PM 
beakmyn Offline





Group: Members
Posts: 63
Joined: Sep. 2004
Posted: Feb. 09 2007,23:53 QUOTE

I have the script on my site that another user posted (yes I forget to give him/her credit) http://www.frontiernet.net/~pictureframe

As I understand it the only "automatic" way is to boot with the drive inserted and let bootlocal.sh kickoff the script, since there's no easy to continuously poll for a usb drive and mount it/run a script.


--------------
Have you seen my Damn Small Digital Picture frame?
http://www.frontiernet.net/~pictureframe
http://rapidshare.com/files/27769266/pframedsl.iso.html
http://www.joyceandkevin.com/dslpictureframe/pframedsl.rar
Back to top
Profile PM WEB AOL MSN YIM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Feb. 10 2007,04:01 QUOTE

I'd say the most useful method (or at least one of) would be to set up a hotkey.  Instead of a script constantly running, checking to see if a stick has been inserted (and whether this stick is not the same as the one that was previously inserted), you could simply plug in the stick and then press a key or combination of keys to launch the script. This also removes the need to have your stick plugged in at boot time, and can be done at any time.

Automating can get a bit overused at times....sometimes it's better to save the development time and effort, as well as cpu load, and trade it for minor physical activity.


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
5 replies since Feb. 09 2007,09:57 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: Syncing folder from USB Stick

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code