Chm file is a Microsoft Compressed HTML Help file in a proprietary format for online help files. Under Linux/FreeBSD or UNIX you can open .chm file using following three different programs which makes it possible to browse native Windows CHM files:

Install chm viewer

Use apt-get or yum command to install chm viewer:
# apt-get install gnochm
OR
# apt-get install kchmviewer

Gnome Desktop User

Use gnochm program as follows
$ gnochm file.chm

KDE Desktop User

Use kchmviewer (very nice and highly recommended) program as follows
$ kchmviewer file.chm

Other tool

xchm program is quite outdated but works:
$ xchm file.chm

PDF is an acronym for Portable Document Format. It is a proprietary file format developed by Adobe Systems for representing two-dimensional documents in a device independent and resolution independent format. You can open pdf file using graphical as well as command line tools (i.e. without GUI). Linux supports following PDF viewer under X window:

  • Gnome pdf viewer (gpdf)
  • KDE pdf viewer (kpdf)
  • xpdf
  • Official Adobe acrobat reader

Graphic pdf viewer under Linux/FreeBSD

If you are using Gnome desktop…

Open a shell prompt and type the command:
$ gpdf file.pdf
OR
$ evince file.pdf

If you are using KDE desktop…

Open a shell prompt and type the command:
$ kpdf file.pdf

You can also click on K icon > Select Graphics > Select PDF viewer

Console pdf viewer under Linux/FreeBSD

Console pdf viewer

As far as I know there is no console based PDF viewer exists. But you can use the following trick to open a PDF file:

a) First install pdftohtml – A command-line tool for converting pdf-files into html and other formats.

Debian User install pdftohtml using following command:
# apt-get install pdftohtml
Red Hat / Fedora user install pdftohtml using following command:
# yum install pdftohtml
FreeBSD user install pdftohtml using following command:
# pkg_add -v -r pdftohtml
OR use ports collection:
# cd /usr/ports/textproc/pdftohtml
# make; make install

The idea is very simple you will use a pdftohtml program to convert a PDF file into html, xml and png images and then display them using text browser such as elinks or lynx. This is useful when you works on remote server or if GUI is not available:
For example to convert CH09.PDF file you need to type the following set of commands:
$ pdftohtml CH09.PDF
$ lynx CH09.html

OR
$ elinks CH09.html

You can also convert a PDF file to text file using following command:
$ pdftotext CH09.pdf
$ vi CH09.txt

See also

=> You can get Official Adobe acrobat reader here for UNIX/Linux oses.

You can use program called cleanlinks. The cleanlinks program searches the directory tree descended from the current directory for symbolic links whose targets do not exist, and removes them. It then removes all empty directories in that directory tree. It was originally created for symbolic links based directories but works with normal directories too.

For example if you want to remove all empty directories from /tmp directory, type the command:
$ cd /tmp
$ cleanlinks

Please note that cleanlinks command is part of XFree86 project. Another method is to use combination of shell commands in script:

#/bin/bash
DIR="$1"
 [ -d $DIR ] && [ $(ls -l $DIR | wc -l) -eq 1  ] && rmdir $DIR ||  :

Save and execute a script:
$ script.sh dir1

You can also try out tmpreaper command which recursively searches for and removes files and empty directories which haven’t been accessed for a given number of seconds. Normally, it’s used to clean up directories which are used for temporary holding space, such as “/tmp”. Syntax is as follows:
tmpreaper TIME-FORMAT DIRS

Where,

  • TIME-FORMAT : Defines the age threshold for removing files. The TIME-FORMAT should be a number, defaulting to hours, optionally suffixed by one character: d for days, h for hours, m for minutes, or s for seconds.
  • DIRS : Directory name for example /tmp

For example, remove all files accessed 24h before:

# tmpreaper 24h /tmp

Please note that tmpreaper command is not installed by default you may need to install it using apt-get or rpm command.

Q. How do I adjust Linux volume control?

A. You need to use a program called aumix to adjust sound / volume control. This program adjusts the settings of an audio mixing device. It can be used from the command line, in scripts, or interactively with the keyboard or mouse.

You can launch volume control as follows:
=> Click on Main Menu

=> Select Sound & Video

=> Now select Volume Control

aumix – command line program

Just type following command at shell prompt (open x terminal):
$ aumix
Output:

You can use following keys to control aumix sound settings:

  • page up, page down, up and down cursor: Select a new control.
  • Tab, Enter, , comma and period : Toggle between level and balance controls
  • + and – : Adjust the setting of the current device. The + and right cursor keys increase the level by 3%; the – and left cursor keys decrease it by the same amount.
  • S or s : Save settings to the rc file
  • U or u : Undo any muting
  • M or m : Mute or unmute
  • Q or q : End the program (exit to shell prompt)

Advanced Power Management (APM) is an API developed by Intel and Microsoft, which allows BIOS to perform power management.

These days it is outdated and replaced by ACPI (The Advanced Configuration and Power Interface).

Under Linux to find out if, Advanced Power Management support available or not you need to type following commands:

$ apm_available
$ echo $?

It returns three values:

  • 0 (true) : APM subsystem is available
  • 1 (false): APM subsystem is not available
  • 2 : Usage error (arguments supplied)

You can also try out following command:

$ apm_available && echo “Yes” || echo “No APM support”

You can use following command to test whether ACPI subsystem is available or not:

$ acpi_available && echo “Yes” || echo “No APM support”