Am trying to view the contents of a system log -system.log.0 ,system.log.2 using macOS terminal .The logs are located under /private/var/log (macOS)

I have tried zcat,gunzip etc.but with no fruitful result.

gunzip -c system.log.0.gz 
gunzip: can't stat: system.log.0.gz (system.log.0.gz.gz): No such file or directory

What would be the suitable way to merge system.log.N into a *.log file and view them in terminal

  • What is the result of ls /private/var/log ? – Romeo Ninov Apr 10 '19 at 10:42
  • its system.log and system.log.0.....but when i perform gzip -l system.log.0,it says "not in gzip format".... – swasti bhushan deb Apr 10 '19 at 10:50

Based on comment you do not have compressed files so there is no need to use gunzip. To view the file you can use commands like:

cat  /private/var/log/system.log.0


more /private/var/log/system.log.0


less /private/var/log/system.log.0

Same for file /private/var/log/system.log and other log files

  • @swastibhushandeb, in such case feel free to upvote and/or accept the answer :) – Romeo Ninov Apr 10 '19 at 11:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.