Showing posts with label ksh. Show all posts
Showing posts with label ksh. Show all posts

Wednesday, November 5, 2008

zcat Shell command (UNIX / Linux)

The zcat command allows the user to view the contents of a compressed file without uncompressing that file by writng contents to the standard output. The zcat command does not rename the expanded file or remove the .Z extension.

The command expects compressed input files (i.e. .Z, .gz, or .bz2)

zcat is equivalent to: uncompress -c

Flags

-n Omits the compressed file header from the compressed file.
-V Writes the current version and compile options to standard error.


Example:

zcat file_1.Z wc -l (print the newline counts)

zcat file_1.Z more (filter for paging through text one screenful at a time)

Wednesday, October 29, 2008

KORN shell command line auto-complete

Add the following to the to file that your shell uses for initialization (i.e. .profile)


set -o vi



To use the command line auto complete, press Esc

Note: This only auto-complete the unique part of the file name.