[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How can I sync. my USB drive with /home?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Tilley wrote:

> I wish to automate the process of continually copying the contents of my
> USB drive (/media/sda1) to my /home directory.
> 
> Scripting should be able to accomplish this.  Does a KDE program or applet
> exist to help me in my search?
> 
> Thanks, Bob

You could create a script like this and store it appropriately somewhere
under your home dir:
- ---------------

#!/bin/sh

TARGETDIR=/home/myname/usbstick
rsync -qrRlpogt --delete /media/sda1 $TARGETDIR


- ---------------

And then create a link to it on your desktop or on the kicker whichever
suits you the best.
Executing the script at regualar intervals is also possible but would
probably a waste of resources.

As you see will observe this is one-way-syncing from the stick to your home
directory. the --delete will remove files from the target directory that do
not reside on the stick any longer. Remove this parameter if you don't want
this.

Best regards

Jan

- -- 
** Do not use the reply-to address. It'll end up in the trash can
** Mail me at: janATschledermann.or"REMOVE_THIS"g 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFDR9P+2e7hhNVjt04RAquJAKC7NEIqNLKMnqLoQSWkXnITfu+qIACgvdqw
U4x1c+IZuJPrJmTXcpsuX20=
=3HG7
-----END PGP SIGNATURE-----



Reply to: