Thursday, June 26, 2014

UNIX Information Commands

    man [-option] [command] (CR) : Manual or UNIX help command. The usual quit sequence `q (CR)' can be used to quit long UNIX `man' listings, `(CR)' is used for new `man' pages. During a IBM Telnet session the `Clear-key' is needed for new CMS pages that are not the same as the `man' pages. Otherwise `d', `q' or `Ctrl-c' should work for UNIX like access.

    finger [user] (CR) : Displays system biography on user `[user]'.

    whereis [name] (CR) : Locates source for program or command; e.g. `whereis kermit'.

    which [name] (CR) : Tell which version of a program or command will be used in your session in case of multiple copies; e.g. `which cc'  or which java

    whatis [command] (CR) : Describes the command [command].

    who am i (CR) : Displays current user id and access.

    who (CR) : Displays currently logged in users.

UNIX Process Commands


    jobs - l (CR) : Display a simple single line with currently active job status.

    ps (CR) : Display current process ids (``pid'') needed for killing.

    ps t[N] (CR) : Displays ``pid'' for terminal or tty [N].

    kill -9 [pid] (CR) : Means a ``sure kill'' of ``pid'' [pid]; this becomes necessary when you lose control of a process or have a session aborted. CAUTION: Aborted sessions are not uncommon so it is helpful to develop skills of a super process (program) killer.

Unix Env related command


    setenv TERM vt100 (CR) : Sets `TERM' variable to type `vt100', which should be the default and can be checked by using `printenv', else use `h19b' or your correct terminal emulation if recognizable by the remote host. The recognizable terminal type are in the alphabetized subdirectories of `/usr/lib/terminfo', e.g., `v' directory contains vt100 listings. Caution: `YTERM' is ideal for PC to CMS communication, but does not have a terminal type that is recognizable by UNIX systems ('vt100' may sometimes work as a substitute, but `unknown' type means a poor line edit session).

    setenv TERMCAP vt100 (CR) : Sets `TERMCAP' variable to type `vt100', else use `h19b' etc. You can put customized terminal configuration in the file `.termcap' and enable it with the command `setenv TERMCAP $HOME.termcap' either in your shell or in your '.login' file.

    tset -m :h19b (CR) : Sets terminal type to Heathkit or Zenith type `h19b'. WARNING: Several terminal commands are given here, because you might have to try several before you find one that works. Note that one of the biggest problems in working with advanced, remote computers is COMMUNICATION and that much of this local guide is intended to solve communication problems.

    stty erase \[key](CR) : Set or reset the terminal (`tty') erase key to `[key]'.

    stty all (CR) : Display usual Control characters; with arguments can be use to set terminal communication variables; also try `stty everything'.

printenv


    printenv (CR) : Print out environment meta parameters such as defaults, terminal types and key assignments, eg., SHELL, PATH, TERM, NCPUS, HOME, TMP, AFS, and AFSTMP.