im working on some bash scripts that run on logon/off and backup the resume data for uTorrent so that it automatically copies the resume data to the other OS i boot into and resumes the torrents where i left off ( i have a quad boot ). im currently working on the Ubuntu on/off scripts. i have Ubuntu 12.04.
the problem is that i cant get the if file exists part to work:
Code:
if [ -f "/opt/utorrent-server-v3_0/resume.dat" ];
i know "/opt/utorrent-server-v3_0/resume.dat" exists as i get command not found in terminal. It always goes to the else, so im pretty sure something is wrong with the file exists part. what do you guys think?
Thanks!
Code:
if [ -f "/opt/utorrent-server-v3_0/resume.dat" ]; #if it exists
then
#copy currrent resume to the Data partition
cp "/opt/utorrent-server-v3_0/resume.dat" "/media/Data/uTorrentBack"
cp "/opt/utorrent-server-v3_0/resume.dat.old" "/media/Data/uTorrentBack"
#copy all .torrent files to the Data partition
cp "/opt/utorrent-server-v3_0/"*.torrent "/media/Data/uTorrentBack"
#else
zenity --info --text="uTorrent resume files not found! \n uTorrent not installed?" #make a pop-up alert!
fi
PS: i couldn't post in the dev + program forum below, sorry
Bookmarks