LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-18-2008, 11:51 AM   #1
drokmed
Member
 
Registered: Dec 2005
Location: St Petersburg, FL, USA
Posts: 220

Rep: Reputation: 31
How to view readme.xyz.gz files from command line?


Is there an easy way to view text*.gz files from the command line, without uncompressing them?

Midnight Commander can view the text files with it's built in viewer. I'd rather use something like 'more' or 'less', but didn't see how with those.

Thanks
 
Old 02-18-2008, 11:55 AM   #2
javaroast
Member
 
Registered: Apr 2005
Posts: 131

Rep: Reputation: 19
gunzip -c text*.gz |less
or gzcat or zcat if they are installed

Last edited by javaroast; 02-18-2008 at 11:59 AM.
 
Old 02-18-2008, 12:02 PM   #3
drokmed
Member
 
Registered: Dec 2005
Location: St Petersburg, FL, USA
Posts: 220

Original Poster
Rep: Reputation: 31
I don't see gzcat or zcat packages available. Are they a sub-set of a package?

Sorry, I guess I should have said I'm running Debian Etch 4.0r2.
 
Old 02-18-2008, 12:05 PM   #4
javaroast
Member
 
Registered: Apr 2005
Posts: 131

Rep: Reputation: 19
Yes, the do the same thing as gunzip -c if you are lucky you might even find zless install in which case you can do:

zless text*.gz
 
Old 02-18-2008, 12:08 PM   #5
drokmed
Member
 
Registered: Dec 2005
Location: St Petersburg, FL, USA
Posts: 220

Original Poster
Rep: Reputation: 31
zless is installed!

I knew it had to be something like that.

Thanks!
 
Old 02-18-2008, 12:09 PM   #6
javaroast
Member
 
Registered: Apr 2005
Posts: 131

Rep: Reputation: 19
Actually those are all part of the standard gzip install. The Debian package may install all by default with gzip. Let me check quick.

Ok, here are the files installed with the gzip package:

/bin/gunzip
/bin/gzexe
/bin/gzip
/bin/uncompress
/bin/zcat
/bin/zcmp
/bin/zdiff
/bin/zegrep
/bin/zfgrep
/bin/zforce
/bin/zgrep
/bin/zless
/bin/zmore
/bin/znew

So it looks like you should have zless which will do exactly what you are looking for.

I see you have it great

Last edited by javaroast; 02-18-2008 at 12:10 PM.
 
Old 02-18-2008, 12:15 PM   #7
drokmed
Member
 
Registered: Dec 2005
Location: St Petersburg, FL, USA
Posts: 220

Original Poster
Rep: Reputation: 31
Thats cool, didn't know it had all of that. I'll try to keep in mind z* versions of cat, more, less, diff, etc.

Thanks again, very helpful!
 
  


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
How to view animated Gif files full screen from the command line xmrkite Linux - Software 5 04-13-2014 04:09 AM
hoe to view pdf files in command mode. bruse Linux - Newbie 7 09-15-2005 10:03 AM
Command line utlility to view user info like the GUI one? ivj Linux - Newbie 1 07-27-2004 06:44 AM
View image from command line? Rotwang Linux - General 1 03-22-2004 02:51 AM
sudo: readme : command not found vishal.thorat Linux - Security 3 07-17-2003 05:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:27 AM.

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