0

I would like to use my mac to create cpio files to be used in linux. The filenames seem to be "./name" when created in mac. When the cpio is created in linux name is just "name". The sw I need to use has some problems with that so my question is: is there any flag or something that could be used to get rid of that "./" prefix? Otherwise they seem to work ok.

1 Answer 1

0

It would be interesting to see the command you are using to create cpio archives. I suspect you use find to generate the list and the difference is probably due to the way BSD find and GNU find print their respective lists of results.

In any case you can probably work around this by inserting a sed command between find and cpio to strip ./ off the front of the file names, for example:

find folder | sed 's,^\./,,' | cpio -ov >/tmp/test.cpio

In any case the cpio formats have various limitations that make them less suitable as archives on modern systems. You would therefore be better off using GNU tar or BSD tar to create pax archives, for example:

bsdtar --format=pax -cvf /tmp/test.tar folder

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .