
Let us say your current time zone is IST (Indian standard time) and like to see time current time for Los Angeles (USA – PDT), enter: Zdump command prints the current time in each zonename named on the command line. If you want to recompress a file already in gzip format, rename the file to force a.

If a file does not exist, zmore looks for a file of the same name with the addition of a. zmore works on files compressed with compress, pack or gzip, and also on uncompressed files. Zmore and zless is a filter which allows examination of compressed or plain text files one screenplay at a time on a screen. In this example, search Apache/Nginx/Lighttpd web-server access_log_1.gz for 1.2.3.4 IP address using grep command like syntax:Ĭd /var /log /httpd / zgrep '1.2.3.4' access_log_1.gz zless / zmore commands Search ( grep command or egrep command) compressed files for a regular expression: Zcmp file1.gz file2.gz zegrep / zfgrep / zgrep command Just use the zless or zmore or zcat command to display the contents of a file called :Ĭoncatenate compressed files and print on the screen without using the cat command. The new way: Use zcommands to read gzip compressed files Similarly, we can use the zcat command and so on. For example, I can use the zgrep command invokes grep command on compressed or gzipped files. Let us explore zcommands that allows us to view and do other things on compressed files.

In other words, you need to uncompress the file and then view it temporarily. # Display it after file is uncompressed using the cat command # Unpacking or uncompressing gz files under Linux and UNIX To display the file, you need to execute the following commands on your Linux or Unix box:
