Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

i'm trying to copy a directory to external HDD- i mounted the device and then typed : cd root tar -cf - * | (cd /mnt ; tar -xpf -)

i got this error message: "cowardly refusing to create an empty archive"

when i do ls to the same root directory- it is not empty at all- there are all my needed files.

why does it happen??

share|improve this question

closed as off topic by Gilles, Oli Apr 18 '11 at 9:31

Questions on Ask Ubuntu are expected to relate to Ubuntu within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question.

There's a semicolon missing in cd root tar -cf - *, isn't it? You was probably trying to pack an empty directory. –  maaartinus Mar 13 '11 at 9:53
Why are you using tar?? cp -a does preserve permissions as well, it seems quite stupid to tar encode the files pipe it to another tar process just to decode the archive again! –  LassePoulsen Mar 13 '11 at 10:50
Duplicate thread: unix.stackexchange.com/questions/9182/… –  Jesse Taylor Mar 13 '11 at 12:08
There is already an answer on Unix.SE, so I'm voting to close here. –  Gilles Mar 13 '11 at 12:43
Right!- i got the answer there......... –  Shira Mar 13 '11 at 15:15

Browse other questions tagged or ask your own question.