December 2nd, 2012, 12:27 PM
If its a backup, then I have no idea why you would want to move the file.
However, if you're only copying the file over, check the man page for cp and look at using the --parents switch (this will preserve the dir structure in your backup dir). For example:
# cp --parents /home/test/folder/files/file.log /backups
# ls -la /backups/home/test/folder/files
drwxr-xr-t. 2 root root 4096 Dec 2 17:24 .
drwxrwxrwx. 4 root root 4096 Dec 2 17:20 ..
-rw-r--r--. 1 root root 0 Dec 2 17:20 file.log
The No Ma'am commandments:
1.) It is O.K. to call hooters 'knockers' and sometimes snack trays
2.) It is wrong to be French
3.) It is O.K. to put all bad people in a giant meat grinder
4.) Lawyers, see rule 3
5.) It is O.K. to drive a gas guzzler if it helps you get babes
6.) Everyone should car pool but me
7.) Bring back the word 'stewardesses'
8.) Synchronized swimming is not a sport
9.) Mud wrestling is a sport