LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-17-2015, 11:26 AM   #1
AdultFoundry
Member
 
Registered: Jun 2015
Posts: 282

Rep: Reputation: Disabled
Difference between gunzip and gzip -d


What would be the difference between gunzip and gzip -d commands. I guess gunzip is another program that I can install with "yum install gunzip", but why would I use it if I can run gzip -d?

The most standard commands tools for compression and archiving are gzip and tar. I will be using those. Do I need to run "yum install gunzip" too? Why would I do that?

Last edited by AdultFoundry; 12-17-2015 at 11:27 AM.
 
Old 12-17-2015, 12:17 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
On my system (CentOS 6), gunzip is just a tiny shell script that invokes gzip with the "-d" option and is provided by same package that provides gzip.
 
Old 12-17-2015, 01:53 PM   #3
AdultFoundry
Member
 
Registered: Jun 2015
Posts: 282

Original Poster
Rep: Reputation: Disabled
I have CentOS7 and it looks like gzip was installed by default, and gunzip is not there. As far as I was reading I can run "yum install gunzip". I will run this tomorrow and look at the man pages of both. I am going over a book and some other materials and I want to figure out little things like this that I dont udnerstand, and make some notes. Man pages for the commands should be a good thing to go over too. I think I will do that later on.

Is there any easy way to export all man pages to a file, and then read it in something like a Word document on Windows? It probably is, but I did not look into this yet.

Linux seems to be several levels deep as far as learning it, I would say. I read all about it, but I dont have a good understanding of it yet, at this point.
 
Old 12-17-2015, 03:40 PM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
On RHEL7 gunzip is a script as noted above for CentOS6.

It comes from the gzip RPM as shown by checking the file: rpm -qf /bin/gunzip
That shows it is part of package:
gzip-1.5-7.el7.x86_64

You can verify which files would provide gunzip by running:
yum provides "*/gunzip"

That should output something like:
Quote:
Loaded plugins: langpacks, product-id, subscription-manager
rhel-7-server-eus-rpms/7Server/x86_64/filelists_db | 9.1 MB 00:00:01
rhel-7-server-rpms/7Server/x86_64/filelists_db | 9.1 MB 00:00:01
rhel-ha-for-rhel-7-server-eus-rpms/7Server/x86_64/filelists_db | 158 kB 00:00:00
rhel-rs-for-rhel-7-server-eus-rpms/7Server/x86_64/filelists_db | 167 kB 00:00:00
gzip-1.5-7.el7.x86_64 : The GNU data compression program
Repo : rhel-7-server-eus-rpms
Matched from:
Filename : /bin/gunzip
Filename : /usr/bin/gunzip



gzip-1.5-7.el7.x86_64 : The GNU data compression program
Repo : rhel-7-server-rpms
Matched from:
Filename : /bin/gunzip
Filename : /usr/bin/gunzip



gzip-1.5-8.el7.x86_64 : The GNU data compression program
Repo : rhel-7-server-eus-rpms
Matched from:
Filename : /bin/gunzip
Filename : /usr/bin/gunzip



gzip-1.5-8.el7.x86_64 : The GNU data compression program
Repo : rhel-7-server-rpms
Matched from:
Filename : /bin/gunzip
Filename : /usr/bin/gunzip



gzip-1.5-7.el7.x86_64 : The GNU data compression program
Repo : @anaconda/7.0
Matched from:
Filename : /bin/gunzip
Filename : /usr/bin/gunzip
That shows gzip (multiple versions) all include gunzip. If you have gzip package (rpm) installed then gunzip should have come in with it. If it isn't there it suggests something deleted it after installation.
 
1 members found this post helpful.
Old 12-17-2015, 03:54 PM   #5
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
The man pages for all Linux packages are available online. There are various ways to save a webpage, either as html or pdf, for offline viewing. Any search engine will find that site for you. I don't have the exact URL at hand nor the incentive to look it up right now.
 
Old 12-18-2015, 03:18 AM   #6
AdultFoundry
Member
 
Registered: Jun 2015
Posts: 282

Original Poster
Rep: Reputation: Disabled
Thanks, that clears it up.

### Edit:

Does anybody know a good or the best place where I can find these man pages online, but for CentOS7. I've found some websites through google.com but some of them seem to be old, and some other ones dont indicate that this is CentOS7, so I am not sure. I would like to have an exact copy of what I have on my hosting account, with the latest CentOS7 installed.

Last edited by AdultFoundry; 12-18-2015 at 03:42 AM.
 
Old 12-18-2015, 12:51 PM   #7
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
The man pages are available on your system itself. I'd recommend you get used to viewing them there as often enough you'll want to review a specific man page (e.g. the grep man page, the bash man page). Each individual man page have quite a bit in it (e.g. the bash man page is very detailed).

Each man page is unique to the item it describes and while there are various bundles that contain multiple man pages many man pages come in with the utilities they describe so it isn't one monolithic setup the way you think.

You can type "man man" to see details about the "man" command itself.

If you really must get the man pages into another location such as Word you can change the "pager" to something like "cat" so it just outputs as one large display then either pipe that into an email or cut and pasted into a word document.
e.g. "man -P cat ls" will display the whole "ls" man page as one stream that can be piped into email or cut and pasted from the screen (assuming it has scroll bars and the scroll contains enough lines).

However, in practice simply trying to read through all man pages isn't the way to go. As noted above you usually want to look at a specific man page when you're using the item it describes and need more details.

Some things you might be better served looking for by typing the words along with "tutorial" in a web search. (e.g. bash tutorial).

None of us learned it all in one day nor in fact do any of us know it "all" (despite the fact that some pretend to). Linux is a continuous learning experience.

Last edited by MensaWater; 12-18-2015 at 03:26 PM.
 
Old 12-18-2015, 04:19 PM   #8
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
Let me google that for you.Man pages are for packages, not distros. The same package runs in all distros, although the installation package might be different, i.e. .deb or .rpm. But the package is the same, and the man page is the same. Man pages don't change often, so most of them are pretty old. They're still current, though.

Last edited by sgosnell; 12-18-2015 at 04:21 PM.
 
Old 12-19-2015, 07:09 AM   #9
normanlinux
Member
 
Registered: Apr 2013
Location: S.E. England
Distribution: Arch
Posts: 161

Rep: Reputation: Disabled
gnu is not unix

The problem is that FSF concentrate too much on the not part of their acronym.

In the unix world there was no need for a separate shell script. In the past, unix programs with related functionality used a link (not a symlink!) and the program inspected argv[0] to see what it was to do. So, on my old SysV r2 machine or my old AIX machine mv and cp were one binary with 2 names (links). Now, they are two:
1452431 -rwxr-xr-x 1 root root 130272 Jul 5 21:59 /usr/bin/cp
1452462 -rwxr-xr-x 1 root root 122032 Jul 5 21:59 /usr/bin/mv

This was a neat solution, but something that current developers seem to have forgotten how to do
 
Old 12-19-2015, 07:38 AM   #10
AdultFoundry
Member
 
Registered: Jun 2015
Posts: 282

Original Poster
Rep: Reputation: Disabled
@MensaWater - Most of the people say not to read all the man pages. I was not going to read all of them, as I know there is 8 separate sections, and I probably need only one of them. Either way, it could be good to see it as a whole, delete what is not needed for me (could be 90+), and be able to highlight the most important things. But I will not work on this, most likely, as it seems as it would take too much time. I have a list of 100+ the most Linux commands, and I will export the man pages for these, lets say.

I dont want to know it all, but at this point I am running my first unmanaged server, and it seems like I need to know more. It kind of works, but I dont understand what is underneath it 100. I am learning Apache Web server now, advanced, as this is mostly what is needed for me (webmaster / hosting websites).

I read around 12+ the best Linux books recently, and quite a lot of online articles, so far. So I am not new, but I need to learn more, so I know what I am doing. I kind of have it working, but my knowledge is not good enough.

Last edited by AdultFoundry; 12-19-2015 at 07:39 AM.
 
Old 12-19-2015, 07:52 AM   #11
AdultFoundry
Member
 
Registered: Jun 2015
Posts: 282

Original Poster
Rep: Reputation: Disabled
But, either way, since we are talking about it, what would be the location of the man pages files on CentOS7? Is it just one directory locations or is it scattered all over the place. If yes, I guess I could find it with something like find / locate or grep. How would I export all of this to a text file, which I could download through ftp?

This is definitely a doable thing, and I would like to try to take this path. See how large it will be, how easy will it be to delete what is not needed for me (like the 1-8 sections thing, probably one or two max are needed).

Somebody told me that what I need is available online here (CentOS7):

http://linux.die.net/man/

Would this be CentOS7? If not, and if you know a good location for it, please let me know.

Thanks.
 
Old 12-19-2015, 09:52 AM   #12
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by AdultFoundry View Post
But, either way, since we are talking about it, what would be the location of the man pages files on CentOS7?
The files are all under /usr/share/man. If you want typeset, printable output, use the "-t" option on the man command to make a PostScript file.
Code:
man -t cat >/tmp/cat.ps
Then you can view and print the PostScript file. I often do that when I'm just starting to use a new, complex command. For the really long manpages though, like bash, there's the old problem of, "You can't grep dead trees," and viewing the text online is the most practical way to find what you are looking for.
 
Old 12-21-2015, 04:05 AM   #13
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
man pages really just for ref; the basic design often assumes you know (at least roughly) what you want/need.

To learn stuff you are indeed going to have to read the manuals at eg www.linuxtopia.org and google for tutorials on each subject.
As above, the amt of info available is (effectively) infinite; nobody can know it all.

The http://linux.die.net/man/ is easy to search, but its not Centos 7 specific; for that the see the equiv RHEL manuals at linuxtopia.org or https://access.redhat.com/documentat...erprise-linux/
 
Old 12-21-2015, 10:27 AM   #14
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
A few points:
1) The man pages are NOT the same on all versions of all distributions. While it is generally true that most of them are very similar there ARE differences based on newer capabilities added over time. (e.g. mailx on RHEL5 didn't have built in attachment flags but it does on RHEL6). It is important when looking at a man page to look at the one installed on the system you're using if possible as it will likely have the one relevant to the version of utility it is describing.

2) Not all man pages are in a single location. You can type "man man" to get what sets the locations to search for man pages. Also, add on products from third parties might come in with their own man pages installed under the application's heirarch rather than default locations and you'd want to add those to your manpath to search.

3) Man despite its name is not a monolithic "manual". It is a collection of many, many, different documents so barring a for loop there wouldn't be a way to print out everything then exclude what you want. Instead the OP should do as he suggested and print only the ones he wants.

4) The man pages on different types of UNIX are generally different than each other and on Linux. Generally speaking the Linux version of a command will have more options than a given UNIX variant.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] gzip: exp2012dec11.dmp.gzip: unknown suffix -- ignored 1300 Linux - Newbie 11 12-23-2012 09:19 AM
[gzip] appears in process table after gzip command completes redmanDBA Linux - General 0 02-26-2008 06:12 AM
Not in gzip format, after attempting gunzip libstdc++-libc6.1-2.so.3.gz ukrainet Linux - Newbie 5 11-19-2004 07:34 AM
gzip gunzip / unzipping kismet brings freaky friday question for newbie SBrogan Linux - Software 3 09-22-2004 12:53 PM
create symlink with an option,e.g. gunzip & gzip,how? l_9_l Linux - General 1 05-15-2002 03:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration