I just can't understand what is the mistake with the following tar command that complains tar: Cowardly refusing to create an empty archive
tar -c --use-compress-program=pigz -f 107668.tar -C /home/psham/projects/data_dump/2021/1076data The folder /home/psham/projects/data_dump/2021/1076data exists & has files in it.
Please could a second pair of eyes help me out of this?
31 Answer
Put a . in the end of the command.
The -C tell tar to change its directory before running but without specifying what to archive tar has no idea what to do.
You can read tar cf foo.tar -C bar zar1 zar2 as: create an archive named foo.tar by going to bar folder and archiving zar1 and zar2 files.