Tuesday, June 06, 2006

Compatibilities of tar

Arrgh. More Linux/Solaris incompatibilities. Seems as though the -I flag (include files listed in a file) on Linux is not supported. In fact, it gives you a nice error message "Warning: the -I option is not supported; perhaps you meant -j or -T?". Looks like I'll be twiddling with my .profile in the next couple of days...

Update: My boss pointed out -T works with Solaris and Linux. Doh.

1 comment:

Noons said...

And if you want to pass a list of files to tar via pipe - convenient hen you're doing for example a find - then you can use this, also portable:

find . -type f (whatever filter) -print|tar -cv -b8 -f (whatever pathname for output tar file) -T -

It seems to work fine in both our Loonix and Solaris boxes.

I had to use () to indicate the optionality, of course they don't get typed.