reading the favorite manual

Share your own howto's etc. Not for support questions!

reading the favorite manual

Postby llivv » 2014-08-21 15:32

This manual reading Tip is directed at beginner and novice users like myself who may find it difficult to read program manual pages.

I'm processing files for a friend without access to unix tools and I have to read the manual to use the tools necessary.
This is always a key to being able to do whatever it is one wants to do when using GNU/Linux or any unix variant for that matter.

This is a simple tool called zip.
It's fairly easy for me to use zip basic functions because I already understand the basics of how a lot of manual pages are written.
Although, there are methods for using zip described in the manual ( man page ) that are still over my head too.
examples are streaming input and when and how zip64, bzip or bzip2 is used when calling zip, mostly because I only use zip for files that my windows friends need to unzip without access to unix tools.
If I want to use unix tools for compression I just go with xz as it's what has been discussed as a standard for .debs

OK,
here's a snippet of the zip manual explaining the basics of zip usage.
Code: Select all
       Command format.  The basic command format is

              zip options archive inpath inpath ...

       where  archive  is a new or existing zip archive and inpath is a direc-
       tory or file path optionally including wildcards.  When given the  name
       of  an existing zip archive, zip will replace identically named entries
       in the zip archive (matching the relative names as stored  in  the  ar-
       chive)  or  add  entries for new names.  For example, if foo.zip exists
       and contains foo/file1 and foo/file2, and the  directory  foo  contains
       the files foo/file1 and foo/file3, then:

              zip -r foo.zip foo

       or more concisely

              zip -r foo foo

       will  replace foo/file1 in foo.zip and add foo/file3 to foo.zip.  After
       this,  foo.zip  contains  foo/file1,  foo/file2,  and  foo/file3,  with
       foo/file2 unchanged from before.

       So if before the zip command is executed foo.zip has:

               foo/file1 foo/file2

       and directory foo has:

               file1 file3

       then foo.zip will have:

               foo/file1 foo/file2 foo/file3

       where foo/file1 is replaced and foo/file3 is new.


If you don't get it right away, take heart, I didn't either.
I usually skim the manual for entries I 'm using right now and skimming the basics is not the best idea
when using a tool. So I had to go back and carefully re-read this part of the man page until I got it.
For you advanced users already sneering at this Tip
yeah I know, so simple!
But it's early in the morning and I'm way behind in my sleep schedule, still..

For those following this Tip and would like to follow it down the rabbit hole
here is another manual snippet which will give you some instant gratification or more reading for extra credit.
Code: Select all
options
       -@
       -
[...]
       -h
       -?
       --help
              Display the zip help information (this also appears  if  zip  is
              run with no arguments).


       -h2
       --more-help
              Display  extended  help  including  more on command line format,
              pattern matching, and more obscure options.]
in the kitchen with Julia
The Past, Christmas Present and Future
Get on the Dbus to Bcan
User avatar
llivv
 
Posts: 5634
Joined: 2007-02-14 18:10
Location: cold storage

Re: reading the favorite manual

Postby koanhead » 2014-08-21 20:41

Man pages are often easier to read on Debian's site:http://manpages.debian.org/cgi-bin/man.cgi?query=zip&apropos=0&sektion=0&manpath=Debian+7.0+wheezy&format=html&locale=en

It's often useful to be able to read man pages for packages not present on the system (for example, reading on one computer while you fiddle on another). Also, you can use it to read manpages for different releases than the installed one, which comes in handy if you have many different Debians around you.

When using the `man` program, you can enter `/string` to search for "string", and `n` to repeat the search.

IMO manpages are great for reference, but not so good for introductory learning. There are lots of online resources for introductions and HOWTOs, but much less so on the local system. The `doc-central` and `dhelp` packages (which index the documentation installed by packages to /usr/share/doc and friends) can help with this, but if you're trying to set something up on a non-networked Debian (or, really, any GNU/Linux) box without already knowing what you're doing, it's going to be hard going.
User avatar
koanhead
 
Posts: 110
Joined: 2013-06-20 16:54


Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable