xargs

Mac backups - handling spaces in filenames with find, tar, and xargs

This morning I decided to take a few minutes to backup all the songs I've purchased over the last half-year. These are all on my Mac OS X system, under the Music folder in my home directory.

The problem with trying to do this with standard Unix tools is that all these subdirectories and filenames have spaces in their names. Just looking at the Music folder, it contains many directory names like this:

Linux backup - Using find, xargs, and tar to create a huge archive

I did something wrong in a previous blog entry that led me to use the "pax" command to create a large backup/archive. There's nothing wrong with using the pax command -- other than the fact that it's not available for Cygwin -- and I really needed to created a huge archive. (I know that pax is available for our Linux and Unix systems, but I can't find a version for Cygwin.)

Linux backups - using pax instead of tar to create a large backup

I had a problem using the tar command this morning while trying to create a large archive, and rather than figure out what in the world I was doing wrong with find, xargs, and tar, I decided to use pax instead. It worked great at creating an archive file that tar could still read, so instead of fighting with the find/xargs/tar three-headed monster to create a large archive, pax bailed me out.

Syndicate content