LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-17-2008, 10:24 AM   #1
jonette20
Member
 
Registered: Jul 2007
Location: Ohio
Distribution: Ubuntu 7.04
Posts: 65

Rep: Reputation: 15
Problems opening log file


Hi,

Can anyone tell me how to open a .gz file?
I have a Squid access.log file that I can't seem to open.
My operating system is Ubuntu 7.4.

Thanks in advance
 
Old 04-17-2008, 11:06 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Assuming the file is not a compressed binary file, you can look at the contents with this command:
zcat <filename>.gz

If it's more than a screenful, use
zcat <filename>.gz | less

If you need to uncompress the file for some reason:
gunzip <filename>.gz

Then open it in your favorite editor.
 
Old 04-17-2008, 03:58 PM   #3
jonette20
Member
 
Registered: Jul 2007
Location: Ohio
Distribution: Ubuntu 7.04
Posts: 65

Original Poster
Rep: Reputation: 15
Hi,

Zcat did the trick

Thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
domina login problems - log file help krazyglue Linux - Server 1 01-15-2008 02:37 PM
any ideas to reduce log file size or make log file size managed? George2 Programming 2 08-13-2006 07:55 AM
Xp user opens file via Samba, but file is not locked after opening??? marisdembovskis Linux - Networking 8 07-04-2006 04:30 AM
konqueror problems (looping dirs and file opening) Cyber Maid Linux - Software 4 12-17-2005 08:57 PM
Opening Log Exiledhellfire Linux - Newbie 5 05-22-2005 06:08 PM

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

All times are GMT -5. The time now is 03:45 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration