On Sun, Jan 04, 1998 at 07:08:17PM -0500, Scott K. Ellis wrote: > On Sun, 4 Jan 1998, Catouch wrote: > > > I have had great success, so far installing and configuring my Debian > > system. > > However, I cannot access the HOWTO files. They are in /usr/doc/HOWTO and > > are > > gz. How can I read them? Thank you. > > If you've installed less, the 'zless' command will view compressed files. > Otherwise, 'zcat file.gz | more' will also work. If you have the less > from hamm installed, the lesspipe program provides a way to get less to > view compressed files without intervention.
The easiest solution to this is indeed to set up the lesspipe program, which is very simple. Just put something like LESSOPEN='|/usr/bin/lesspipe %s' export LESSOPEN in your /etc/profile or ~/bash_profile. The file /usr/bin/lesspipe is supplied by the less package. It contains this 'case' statement, which shows what files you can view with it (besides, of course, plain text files) and what it does with them before piping them into `less': <quote> # Decode file for less case "$1" in *.arj|*.ARJ) if [ -x /usr/bin/unarj ]; then unarj -v $1; else echo "No unarj available"; fi ;; *.deb) echo "$1:"; dpkg --info $1; /bin/echo -e '\n*** Contents:'; dpkg-deb --contents $1 ;; *.gif|*.jpeg|*.jpg|*.pcd|*.png|*.tga|*.tiff|*.tif) if [ -x /usr/X11R6/bin/identify ]; then /usr/X11R6/bin/identify $1; else /bin/echo -e "No identify available\nInstall ImageMagick to browse images"; fi ;; *.tar.gz|*.tgz|*.tar.Z) tar tzvf $1 ;; *.gz|*.Z|*.z) gzip -dc $1 ;; *.tar) tar tvf $1 ;; *.zip|*.ZIP) if [ -x /usr/bin/unzip ]; then unzip -v $1; else echo "No unzip available"; fi ;; esac ) 2>/dev/null </quote> After you have set the LESSOPEN variable, commands like these actually give you some readable information: $ less some-package.deb $ less *HOWTO.gz $ less some-file.tar.gz Remco -- If you can't beat your computer at chess, try kick-boxing -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .