Hacker News new | ask | show | jobs
by capableweb 1917 days ago
> Assuming 'man' is short for 'manual', this is exactly where man-pages go wrong.

Why? Manuals come in different levels, not all of them are tutorials/guides, some of them are references. We still call them manuals.

> For example try to figure out how to extract a zip using tar by using the man-pages.

I'm not sure if you're purposefully mixing tars/zips here, I'm gonna assume you mean a "tar-file" instead of "zip" as obviously tar can't unzip a zip file.

Not sure why you're having troubles finding the instructions compared to the thousands of people who managed to find it. Just to refresh my memory (although I know the commands by heart by now), I gave it a try.

1. `man tar`

3. Read through the synopsis, realize I need to specify the archive file with `-f`.

2. Synopsis didn't mention extract, so I search for `extract` as I know I want to extract a file

3. Now I have `tar xf $archive.tar` and I run that. Notice I would like to have some output.

4. Go back to manpages, search for "output" and find the "-v" flag

5. Final command I'm happy with is `tar xfv $archive.tar`

Is that really so difficult? Has the internet ruined peoples ability to search for information themselves and playing around?

1 comments

tar(1) can extract zip files.

tar xf file.zip

Works perfectly

What tar are you running? I'm running `tar (GNU tar) 1.34` and get a `This does not look like a tar archive` error when trying to extract a zip file.
both

bsdtar 3.4.3 - libarchive 3.4.3 zlib/1.2.11 liblzma/5.2.5 bz2lib/1.0.8 libzstd/1.4.5

and

bsdtar 2.8.3 - libarchive 2.8.3

seem to do the job.

I don't use GNU based tools much so I'm unsure if you need special flags for them.