I try to make a backup script, but when i create a zip with the script, and use cd myzip it sais that it dosnt exitst even when i can see it on the server with FileZilla.
This is my script:
TIME=BACKUPMC-`date +%d-%m-%Y-%H:%M`.zip
DEST="/home/daixhosting/d1"
zip -r $TIME /home/daixhosting/d1
Does someone know what the cause can be?
That was the time i runned the script
– Casper Rasmussen Aug 02 '15 at 15:54unzip BACKUPMC-02-08-2015-17:15.zipand then check.. – heemayl Aug 02 '15 at 17:08find / -type f -name 'BACKUPMC-02-08-2015-17:15.zip'? – heemayl Aug 02 '15 at 18:42/rootand check if the file exists or not..if not then filezilla is somehow making a mistake. – heemayl Aug 02 '15 at 19:03file THE_NAME_OF_FILE– heemayl Aug 02 '15 at 19:20for i in /root/*; do printf '%s\n' "$i" | od -c; done– heemayl Aug 02 '15 at 19:24filecommand it gives me this: http://pastebin.com/kjMyeC2A – Casper Rasmussen Aug 02 '15 at 20:10for i in /root/*; do printf '%s\n' "$i" | od -c; done– heemayl Aug 02 '15 at 20:12ls -al /root– heemayl Aug 02 '15 at 21:30And the file command gives me this: http://pastebin.com/uXu2AZux
– Casper Rasmussen Aug 02 '15 at 21:45cdand then runfor file in *; do mv -i "$file" "$(sed 's/\r//g'<<<"$file")"; done– heemayl Aug 02 '15 at 21:54bash– heemayl Aug 02 '15 at 22:00And that gave me no output, and it still not working. Am i running it right?
– Casper Rasmussen Aug 02 '15 at 22:07bash, then runfor file in *; do mv -i "$file" "$(sed 's/\r//g'<<<"$file")"; done– heemayl Aug 02 '15 at 22:09