adrian440
April 13th, 2005, 06:25 AM
Here's a one-line script you can use in a custom application launcher on your panel. Paste the following command into the 'command' space. It uses zenity for visual feedback, and assumes your usb stick is already mounted on /media/sda1. The star of the show, of course, is rsync:
rsync -rtvz --stats /media/usbdisk/Documents/ `echo $HOME`/Documents/ | zenity --text-info --width=600 --height=600 --title="Rsync Output"
To have your documents folder synced to usb disk, just swap the source & destination:
rsync -rtvz --stats `echo $HOME`/Documents/ /media/usbdisk/Documents/ | zenity --text-info --width=600 --height=600 --title="Rsync Output"
So that's two launchers you can use to organise your documents, with just one catch. If you delete a file in your documents directory (or a subdirectory thereof), you may find it turn up again there. To solve this, if you delete a file, delete it from both your usb disk and your documents foler.
rsync -rtvz --stats /media/usbdisk/Documents/ `echo $HOME`/Documents/ | zenity --text-info --width=600 --height=600 --title="Rsync Output"
To have your documents folder synced to usb disk, just swap the source & destination:
rsync -rtvz --stats `echo $HOME`/Documents/ /media/usbdisk/Documents/ | zenity --text-info --width=600 --height=600 --title="Rsync Output"
So that's two launchers you can use to organise your documents, with just one catch. If you delete a file in your documents directory (or a subdirectory thereof), you may find it turn up again there. To solve this, if you delete a file, delete it from both your usb disk and your documents foler.