Tuesday, August 24, 2010

creating an empty tar: "Cowardly refusing to create an empty archive"

creating an empty tar archive so that you can append to it is a little harder than one might think. the obvious thing would be to create a new archive with no files listed. but the developers have decided that this is too risky. here's the workaround (reads the list of files from a file that is empty) ...


tar -tf blah.tar
# tar: Cowardly refusing to create an empty archive
tar -cfT blah.tar /dev/null
# success

No comments: