0

I know thats a pretty dumb question but I didn't found this precise question on internet

I try to tar -cvjf all the contents of a directory (/*) and directly redirect that to a file (> file) but the title error message occurs. I compress both files and directories here

1

The syntax of tar is

tar -f output input

So you want to run

tar -cvjf /path/to/output.tar.bz2 /what/you/want/to/compress
| improve this answer | |
  • Yeah, it was pretty dumb, like I said – wxi Mar 24 at 12:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.