News for hackers. Stuff that matters.
Re:Why is it so difficult to write valid “tar” commands from... by dalke on Wednesday March 25, 2015 @09:29AM (#9262754)
If the thesis were correct then 'zip', which has the arguments in the same order as tar, would also have the same issues.

For example, to add/update an entry in a zip file, do:

    zip test.zip test/test.txt
I have not heard of the zip command-line as being more or equally frustrating than tar, so I do not believe this thesis is correct.
Re:Why is it so difficult to write valid “tar” commands from... by LukeShu on Wednesday March 25, 2015 @10:52AM (#9263301)
Well, zip came after tar, so it probably followed tar's order (as did the `jar` command which even follows tar syntax). Now, consider the `ar` command, which came before tar, for which the analogous command would be

    ar cr test.a test/test.txt
Re:Why is it so difficult to write valid “tar” commands from... by FreakyT on Wednesday March 25, 2015 @09:34AM (#9262775)
That's a good point, though I feel like that may just arise from 'zip' being the less commonly encountered of the two utilities.
Re:Why is it so difficult to write valid “tar” commands from... by dalke on Wednesday March 25, 2015 @10:00AM (#9262966)
I am unable to compare the number of Windows-based developers, who often use zip as an archive format, and Java-based developers, who often use zip to work with jar files, to the number of people who use tar. My guess is that tar users would be in the minority.

How did you come to the conclusion about which is most commonly encountered?

Also, other popular archivers also use the archive-first approach:

    7z.exe a c:\a.7z file1.txt dir2\file2.txt
    rar a -r yourfiles.rar *.txt c:\yourfolder
Re:Why is it so difficult to write valid “tar” commands from... by dagw on Wednesday March 25, 2015 @10:05AM (#9262995)
zip is almost certainly the most used archive format, but that doesn't mean the the 'zip' command line tool is more used than the 'tar' command line tool.

Even though I've probably run across more .zip files than .tar files (and certainly more archives of in the zip format) in my career, if undoubtedly typed 't-a-r' on a command line many more times than 'z-i-p'.

Re:Why is it so difficult to write valid “tar” commands from... by dalke on Wednesday March 25, 2015 @11:07AM (#9263417)
Oh, I certainly use tar more than zip. My downloads directory has 67 tar files and 15 zip files. Bear in mind though that the hypothesis is not specific to Unix development. The examples are:

    cp file1.txt file2.txt file3.txt destination/
    mv file1.txt file2.txt file3.txt destination/
The equivalent in MS Windows command shell is:

    copy file1.txt file2.txt file3.txt destination\
    move file1.txt file2.txt file3.txt destination\
The hypothesis makes the prediction that Windows command-line users (which is a subset of all Windows users) will have similar problems with zip/7zip/rar's "inverted" command-line parameters.

Similarly, the hypothesis predicts that people who use the command-line to work regularly with .jar, .odf, and other zip-based file formats will also have problem with the ordering.

I have not heard of such problems, but I am not knowledgeable about those areas of development.

Re:Why is it so difficult to write valid “tar” commands from... by canjobear on Wednesday March 25, 2015 @10:18AM (#9263078)
It definitely did take me a few tries to figure out how to use 'zip' the first time in the command line on OSX.
Re:Why is it so difficult to write valid “tar” commands from... by dalke on Wednesday March 25, 2015 @11:10AM (#9263436)
Was it because the argument ordering was backwards from what you expected, or for some other reason, like not knowing the specific command-line options? For me it was the second.