Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 7
    You probably tested this with GNU tar. Your confusion comes from the fact that it accepts two different styles of options - the "old-style" tar options without a dash and the "standard unix" options with a dash. The options with dash require an argument of an option to follow the option. So in this case the argument for -f should be output.tar.gz and there must not be z in between. Without re-ordering of the options it would correctly be: tar -cvf output.tar.gz -z folder/. The old style expects all the options in one place and all the arguments follow. Commented Oct 19, 2013 at 12:40
  • See the GNU tar documentation and also for example Tru64 UNIX tar man page. Commented Oct 19, 2013 at 12:42
  • 1
    @pabouk That comment seemed worthy of being an answer by itself. Please add the contents of that comment as an answer to this question so that credit goes where credit is due. Commented May 29, 2014 at 13:46
  • I also had problems, but it was a file with the name -v so apparently tar has some bugs with regards to what files it can backup... this should not be a problem. my workaround since rm and mv would not work, was to use a file manager. so apparently mv and rm are buggy too. i tried mv '-v' v and rm '-v' but got error messages. tar mentioned it could not stat the tar file. was using -cfjv Commented Mar 15, 2015 at 5:15