Hello.
I have a problem with spaces in file and directory paths that tar won't handle. I need to back up files that have been modified in the last 14 days and I use the following command to find them and tar them. However, quite a few files have spaces in them and they don't get backed up. I thought a solution would be to escape them, however I can't seem to escape each file.
The line is simply:
tar -cvf backup.tar `find /Shared/Database/Images -mtime 14`
Some directories in this tree have spaces, some have commas.
Any assistance will be greatly appreciated. I can do something in Perl but would like to do it in script only if possible, as this is only one portion of the full script.
I have a problem with spaces in file and directory paths that tar won't handle. I need to back up files that have been modified in the last 14 days and I use the following command to find them and tar them. However, quite a few files have spaces in them and they don't get backed up. I thought a solution would be to escape them, however I can't seem to escape each file.
The line is simply:
tar -cvf backup.tar `find /Shared/Database/Images -mtime 14`
Some directories in this tree have spaces, some have commas.
Any assistance will be greatly appreciated. I can do something in Perl but would like to do it in script only if possible, as this is only one portion of the full script.