You are on page 1of 28

BASIC OF UNIX

BASIC OF UNIX

This is a list of UNIX utilities as specified by IEEE Std 1003.1-2008, which is part of the Single UNIX
Specification (SUS). These utilities can be found on UNIX Operating systems and most UNIX-like operating
systems.

[edit]List

IEEE Std 1003.1-2008 utilities

Name Category Description First appeared

admin SCCS Create and administer SCCS files

alias Misc Define or display aliases

ar Misc Create and maintain library archives


BASIC OF UNIX
BASIC OF UNIX

asa Text Processing Interpret carriage-control characters

at Process Management Execute commands at a later time Version 7 AT&T UNIX

awk Text processing Pattern scanning and processing language Version 7 AT&T UNIX

basename Filesystem Return non-directory portion of a pathname

batch Process Management Schedule commands to be executed in a batch queue

bc Misc Arbitrary-precision arithmetic language

bg Process Management Run jobs in the background

c99 C Programming Compile standard C programs

cal Misc Print a calendar Version 5 AT&T UNIX

cat Filesystem Concatenate and print files Version 1 AT&T UNIX

cd Filesystem Change the working directory

cflow C Programming Generate a C-language flowgraph

chgrp Filesystem Change the file group ownership

chmod Filesystem Change the file modes/attributes/permissions Version 1 AT&T UNIX

chown Filesystem Change the file ownership Version 1 AT&T UNIX

cksum Filesystem Write file checksums and sizes 4.4BSD

cmp Filesystem Compare two files Version 1 AT&T UNIX

comm Text Processing Select or reject lines common to two files Version 4 AT&T UNIX

command Shell Programming Execute a simple command

compress Filesystem Compress data 4.3BSD

cp Filesystem Copy files Version 1 AT&T UNIX

crontab Misc Schedule periodic background work

csplit Text Processing Split files based on context PWB UNIX


BASIC OF UNIX
BASIC OF UNIX

ctags C Programming Create a tags file 3.0BSD

cut Shell Programming Cut out selected fields of each line of a file

cxref C Programming Generate a C-language program cross-reference table

date Misc Write the date and time Version 1 AT&T UNIX

dd Filesystem Convert and copy a file

delta SCCS Make a delta (change) to an SCCS file

df Filesystem Report free disk space Version 1 AT&T UNIX

diff Text processing Compare two files

dirname Filesystem Return the directory portion of a pathname

du Filesystem Estimate file space usage Version 1 AT&T UNIX

echo Shell programming Write arguments to standard output

ed Text processing The standard text editorVersion 1 AT&T UNIX

env Misc Set the environment for command invocation

ex Text processing Text editor BSD

expand Text Processing Convert tabs to spaces

expr Shell Programming Evaluate arguments as an expression

false Shell programming Return false value

fc Misc Process the command history list

fg Process Management Run jobs in the foreground

file Filesystem Determine file type Version 4 AT&T UNIX

find Filesystem Find files Version 1 AT&T UNIX

fold Text processing Filter for folding lines

fort77 FORTRAN77 Programming FORTRAN compiler


BASIC OF UNIX
BASIC OF UNIX

fuser Process Management List process IDs of all processes that have one or more files open

gencat Misc Generate a formatted message catalog

get SCCS Get a version of an SCCS file

getconf Misc Get configuration values

getopts Shell Programming Parse utility options

grep Misc Search text for a pattern

hash Misc Remember or report utility locations

head Text processing Copy the first part of files PWB UNIX[citation needed]

iconv Text processing Codeset conversion

id Misc Return user identity 4.4BSD

ipcrm Misc Remove a message queue, semaphore set, or shared memory segment identifier

ipcs Misc Report interprocess communication facilities status

jobs Process Management Display status of jobs in the current session

join Text Processing Relational database operator

kill Process Management Terminate or signal processes Version 3 AT&T UNIX

lex C Programming Generate programs for lexical tasks

link Filesystem Create a hard link to a file Version 1 AT&T UNIX

ln Filesystem Link files Version 1 AT&T UNIX

locale Misc Get locale-specific information

localedef Misc Define locale environment

logger Shell programming Log messages

logname Misc Return the user's login name 4.4BSD

lp Text Processing Send files to a printer


BASIC OF UNIX
BASIC OF UNIX

ls Filesystem List directory contents Version 1 AT&T UNIX

m4 Misc Macro processor PWB UNIX

mailx Misc Process messages Version 1 AT&T UNIX

make Programming Maintain, update, and regenerate groups of programs

man Misc Display system documentation

mesg Misc Permit or deny messages Version 1 AT&T UNIX

mkdir Filesystem Make directories Version 1 AT&T UNIX

mkfifo Filesystem Make FIFO special files 4.4BSD

more Text processing Display files on a page-by-page basis

mv Filesystem Move files Version 1 AT&T UNIX

newgrp Misc Change to a new group Version 6 AT&T UNIX

nice Process Management Invoke a utility with an altered nice value Version 4 AT&T UNIX

nl Text Processing Line numbering filter

nm C Programming Write the name list of an object file

nohup Process Management Invoke a utility immune to hangups

od Misc Dump files in various formats Version 1 AT&T UNIX

paste Text processing Merge corresponding or subsequent lines of files Version 32V AT&T UNIX

patch Text processing Apply changes to files

pathchkFilesystem Check pathnames

pax Misc Portable archive interchange 4.4BSD

pr Text processing Print files Version 1 AT&T UNIX

printf Shell programming Write formatted output 4.3BSD-Reno

prs SCCS Print an SCCS file


BASIC OF UNIX
BASIC OF UNIX

ps Process Management Report process status Version 4 AT&T UNIX

pwd Filesystem print working directory - Return working directory name

qalter Batch Utilities Alter batch job

qdel Batch Utilities Delete batch jobs

qhold Batch Utilities Hold batch jobs

qmove Batch Utilities Move batch jobs

qmsg Batch Utilities Send message to batch jobs

qrerun Batch Utilities Rerun batch jobs

qrls Batch Utilities Release batch jobs

qselect Batch Utilities Select batch jobs

qsig Batch Utilities Signal batch jobs

qstat Batch Utilities Show status of batch jobs

qsub Batch Utilities Submit a script

read Shell Programming Read a line from standard input

renice Process Management Set nice values of running processes 4.0BSD

rm Filesystem Remove directory entries Version 1 AT&T UNIX

rmdel SCCS Remove a delta from an SCCS file

rmdir Filesystem Remove directories Version 1 AT&T UNIX

sact SCCS Print current SCCS file-editing activity

sccs SCCS Front end for the SCCS subsystem

sed Text processing Stream editor Version 7 AT&T UNIX

sh Shell programming Shell, the standard command language interpreter Version 7 AT&T
UNIX (in earlier versions, sh was either the Thompson shell or the PWB shell)

sleep Shell programming Suspend execution for an interval Version 4 AT&T UNIX
BASIC OF UNIX
BASIC OF UNIX

sort Text Processing Sort, merge, or sequence check text files

split Misc Split files into pieces Version 3 AT&T UNIX

strings C Programming Find printable strings in files

strip C Programming Remove unnecessary information from executable files

stty Misc Set the options for a terminal

tabs Misc Set terminal tabs PWB UNIX

tail Text processing Copy the last part of a file PWB UNIX[citation needed]

talk Misc Talk to another user 4.2BSD

tee Shell programming Duplicate standard input

test Shell programming Evaluate expression

time Process Management Time a simple command Version 3 AT&T UNIX

touch Filesystem Change file access and modification times Version 7 AT&T UNIX

tput Misc Change terminal characteristics System V

tr Text processing Translate characters Version 4 AT&T UNIX

true Shell programming Return true value

tsort Text processing Topological sort Version 7 AT&T UNIX

tty Misc Return user's terminal name Version 1 AT&T UNIX

type Misc Displays how a name would be interpreted if used as a command

ulimit Misc Set or report file size limit

umask Misc Get or set the file mode creation mask

unalias Misc Remove alias definitions

uname Misc Return system name PWB UNIX

uncompress Misc Expand compressed data 4.3BSD


BASIC OF UNIX
BASIC OF UNIX

unexpand Text Processing Convert spaces to tabs 3.0BSD

unget SCCS Undo a previous get of an SCCS file

uniq Text Processing Report or filter out repeated lines in a file Version 3 AT&T UNIX

unlink Filesystem Call the unlink function Version 1 AT&T UNIX

uucp Network System-to-system copy

uudecode Network Decode a binary file 4.0BSD

uuencode Network Encode a binary file 4.0BSD

uustat Network uucp status inquiry and job control

uux Process Management Remote command execution

val SCCS Validate SCCS files

vi Text processing Screen-oriented (visual) display editor BSD

wait Process Management Await process completion

wc Text processing Line, word and byte or character count Version 1 AT&T UNIX

what SCCS Identify SCCS files

who System Administration Display who is on the system Version 1 AT&T UNIX

write Misc Write to another user's terminalVersion 1 AT&T UNIX

xargs Shell Programming Construct argument lists and invoke utility PWB UNIX

yacc C Programming Yet another compiler compiler PWB UNIX

zcat Text Processing Expand and concatenate data

grep
From Wikipedia, the free encyclopedia

grep is a command line text search utility originally written for Unix. The name is taken from the first
BASIC OF UNIX
BASIC OF UNIX

letters in global / regular expression / print, a series of instructions in text editors such as ed.[1] A
backronym of the unusual name also exists in the form of Generalized Regular Expression Parser. The
grep command searches files or standard input globally for lines matching a given regular expression,
and prints them to the program's standard output.

Contents [hide]

1 History

2 Usage

3 Variations

4 Usage as a conversational verb

5 See also

6 Notes

7 References

8 External links

[edit]History

Grep was created by Ken Thompson as a standalone application adapted from the regular expression
parser he had written for the ed editor (which he also created). The name grep comes from the ed editor
command it simulated, g/re/p (global regular expression print).[2] Its official date of creation is given as
March 3, 1973 in the Manual for Unix Version 4.

[edit]Usage

This is an example of a common grep usage:

grep apple fruitlist.txt

In this case, grep prints all lines containing apple from the file fruitlist.txt, regardless of word boundaries;
therefore lines containing pineapple or apples are also printed. The grep command is case sensitive by
default, so this example's output does not include lines containing Apple (with a capital A) unless they
also contain apple.
BASIC OF UNIX
BASIC OF UNIX

To search all .txt files in a directory for apple in a shell that supports globbing, use an asterisk in place of
the file name:

grep apple *.txt

Regular expressions can be used to match more complicated queries. The following prints all lines in the
file that begin with the letter a, followed by any one character, then the letters ple.

grep ^a.ple fruitlist.txt

As noted above, the term "grep" derives from a usage in ed and related text editors. Before grep existed
as a separate command, the same effect might have been achieved by doing:

ed fruitlist.txt

g/^a.ple/p

where the second line is the command given to ed to print the relevant lines, and the third line is the
command to exit from ed.

Like most Unix commands, grep accepts options in the form of command-line arguments, to change
many of its behaviors. For example:

grep -i apple fruitlist.txt

This prints all lines containing apple regardless of capitalization. The -i argument tells grep to be case
insensitive, or to ignore case.

To print all lines containing apple as a word (pineapple and apples will not match):

grep -w apple fruitlist.txt

But if fruitlist.txt contains apple word followed by hyphen (-) character, it will also get matched.

cat fruitlist.txt

apple

apples

pineapple

apple-
BASIC OF UNIX
BASIC OF UNIX

apple-fruit

fruit-apple

grep -w apple fruitlist.txt

apple

apple-

apple-fruit

fruit-apple

the -v (lower-case v) prints all lines that do NOT contain apple in this example.

grep -v apple fruitlist.txt

banana

pear

peach

orange

1.10 Internal and External Commands


Some commands that you type are internal , built into the shell. For example,
the cd command is built-in. That is, the shell interprets that command and changes
your current directory (1.21 ) for you. The ls command, on the other hand, is
an external program stored in the file /bin/ls .

The shell doesn't start a separate process to run internal commands. External
commands require the shell to fork and exec ( 1.11 ) a new subprocess ( 38.3 ) ; this
BASIC OF UNIX
BASIC OF UNIX

takes some time, especially on a busy system. (Article 7.4 shows an example where


extra speed can be important.)

When you type the name of a command, the shell first checks to see if it is a built-in
command and, if so, executes it. If the command name is an absolute pathname
( 1.21 ) beginning with / , like /bin/ls , there is no problem: the command is likewise
executed. If the command is neither built-in, nor specified with an absolute pathname,
the shell looks in its search path (8.7 ) for an executable program or script with the
given name.

The search path is exactly what its name implies: a list of directories that the shell
should look through for a command whose name matches what is typed.

The search path isn't built into the shell; it's something you specify in your shell setup
files ( 2.2 ) .

By tradition ( 21.4 ) , UNIX system programs are kept in directories


called /bin and /usr/bin , with additional programs usually used only by system
administrators in /etc and /usr/etc . Many versions of UNIX also have programs stored
in /usr/ucb (named after the University of California at Berkeley, where many UNIX
programs were written). There may be other directories containing programs. For
example, the programs that make up the X Window System ( 1.31 ) are stored
in /usr/bin/X11 . Users or sites often also have their own directories where custom
commands and scripts are kept, such as /usr/local/bin .

The search path is stored in an environment variable ( 6.1 ) called PATH ( 6.4 ) . A


typical PATH setting might look something like this:
PATH=/bin:/usr/bin:/usr/bin/X11:/usr/ucb:/home/tim/bin:

The path is searched in order, so if there are two commands with the same name, the
one that is found first in the path will be executed.

You can add new directories to your search path ( 8.7 ) on the fly, but the path is
usually set in shell setup files.

- TOR
BASIC OF UNIX
BASIC OF UNIX

1.9 Which Shell Am I Running?


You can usually tell which family your shell belongs to by a character in the prompt it
displays. Bourne-type shells usually have $ in the prompt. The C shell uses % .
(But tcsh users often use > .)

It's possible to customize the prompt ( 7.1 ) so that it displays additional information,
but most users and system administrators will keep the convention of ending the
prompt with the original prompt character.

To be certain, type one of these commands (the second is for systems that use NIS,
Sun's Network Information Service, to manage network-wide files):
%

grep

yourloginname

/etc/passwd

ypcat passwd | grep

yourloginname

You should get back the contents of your entry in the system password file. [2] For
example:
BASIC OF UNIX
BASIC OF UNIX

[2] That may match more than one entry. Searching for tim could also find a user
named timothy or fatima . A more accurate regular expression
( 26.1 ) is '^yourloginname :' .
tim::23:10:Tim O'Reilly:/home/tim:/bin/csh

The fields are separated by colons. The last field should show the shell you are
using. /bin/csh (or /usr/bin/csh ) is the C shell, /bin/sh is the Bourne shell (or Korn
shell), and so forth. An empty last field defaults to the Bourne shell.

In case you're interested in the rest of the line, the first field shows your login name.
The second stores your encrypted password, if any; this may be kept in a separate
"shadow password" file. The third and fourth fields show your user ID or UID
( 38.3 ) and group ID or GID ( 38.3 ) , respectively. The fifth field often contains
information about you, and the sixth your home directory.

- TOR

1.8 There Are Many 1.10 Internal and External


Shells Commands

1.11 How the Shell Executes Other Commands


When the shell executes an external command ( 1.10 ) , what happens?
UNIX programs are executed through a combination of two system calls (low-level
requests to the operating system) called fork and exec .
The exec system call tells the kernel to execute another program. However, the kernel
replaces the calling program with the new one being called. This doesn't work too
well if you want to return to the original program after the second one has done its
job.
BASIC OF UNIX
BASIC OF UNIX

To get around this problem, programs that want to stick around first copy themselves
with the fork system call. Then the copied program exec s the new program,
terminating itself in the process.
You don't really need to know this little tidbit about what goes on behind the scenes,
but it sure helps to know about fork and exec when reading some UNIX manuals.
Article 38.2 has more information.
- TOR

These are symbols that you can use at the Unix shell prompt as part of a command.

Symbol Meaning

| a Unix pipe
> redirect standard output
< redirect standard input
>> redirect and append standard output
; separate commands on same line
() group commands on same line
/ separator in a pathname
~ (tilde) your home directory
~john the home directory of the user john
. present working directory
.. parent of present working directory
BASIC OF UNIX
BASIC OF UNIX

* Wildcard match of any number of charcters in a filename


? Wildcard match of exactly one character in a filename
[] Wildcard match of any one character enclosed in these brackets in a filename
& process command in background

Appendix B — A Unix Environment (Partial) 123


APPENDIX B
A UNIX ENVIRONMENT (Partial)Appendix B — A Unix Environment
(Partial) 124Appendix B — A Unix Environment (Partial) 125
BASIC OF UNIX
BASIC OF UNIX

Introduction
This appendix gives several examples of Things and their tasks in a Unix C-Shell Environment. I
don’t know if the current breakdown of each set of tasks into (1) tasks that give information, and (2)
all other tasks, is one of the best, meaning one that would be preferred by a majority of Unix users.
That could only be determined by testing on a large population of the users themselves. It is, at
present, simply the breakdown that has proven most natural to me in the course of using Unix over
several years. I am sure there are omissions in each list of tasks, but let there be no doubt about the
goal: for each Thing, to list all the tasks that a user can perform on the Thing. No user should ever
have to figure out if a task he or she has in mind can be performed on a Thing. (I have excluded tasks
reserved for the superuser from this appendix. In the actual Environment, of course, these are
included, and clearly marked as such.) The examples make the reasonable assumption that the Unix
system has man (manual) pages, i.e., on-line information on each command (and a few other terms)
which can be displayed by entering “man” followed by the name of the command or the term, e.g.,
man rm. A portion of the Introduction to the Unix Environment (see Appendix A for a complete
example) is also given, this portion providing a few more details about using the Things and the tasks
listings. Not all referenced sections are included in this appendix. Those not included are marked by
“[not shown]” following the reference. A sequence of vertical dots denotes omitted material.
Appendix B — A Unix Environment (Partial) 126
BASIC OF UNIX
BASIC OF UNIX

Unix Environment
Introduction
About Things and their Tasks ... ...

Body of Environment Things is a term for important Unix entities like files, directories, shells,
scripts — yes, even users! Each such Thing has associated with it a set of tasks. In this Envi-ronment,
every task which can be performed on each Thing is given under the name of the Thing. If you do not
find the task you are looking for in the list of tasks, then it cannot be performed by a user for whom
this Environment is intended! The following conventions have been used in the lists of tasks: •
Commonly used forms of the command(s) implementing each task are given using normal syntax
conventions (see above in this Introduction under “Conventions” [not shown]). For example, cp
<current file name> <new file name>. If you need more information on the command, then simply
enter man <name of command>. • In cases where it was difficult to decide on a commonly used
form, a refer-ence to the man pages is given. A word or phrase in double quotes means that the
definition can be looked up if the user desires. • In cases where an explanation of more than a line or
two is required, a refer-ence to the relevant topic in this Environment is given. • At the end of each
list of tasks, under “Related,” is a list of topics (not neces-sarily just the topics called Things) which
are closely related to the Thing covered by the tasks. ...
.. Appendix B — A Unix Environment (Partial) 127 .
BASIC OF UNIX
BASIC OF UNIX

command
Definition of “command” in Unix: See “command, definition of” [not shown]. Tasks to find
information about commands Given the name of a command, display information about the
command syntax and semantics: man <name of command> Display a list of recently executed
commands: history Display a list of the currently active abbreviations of commands and what they
stand for: more .cshrc Other tasks on commands Execute a command so that it runs in the
“foreground:” Following the prompt, type the command name, then press Enter. Execute a command
so that it runs in the “background:” Same as for running command in “foreground,” except add a &
before pressing Enter. Stop a command from continuing execution, i.e., abort a command: For a
command executing in the foreground, press Ctrl-C. For a command executing in the background,
see under “process”: “Abort a process.” Re-execute the previously entered command: !! For other
options in executing previously-entered commands, see “command, re-execute a” [not
shown].Appendix B — A Unix Environment (Partial) 128 Make a command begin execution after a
specified time: See “sleep” in man pages. Make a command take its input from a file: <command
name> < <file name> Put the output of a command into a file, erasing existing contents of file if file
already exists: <command name> > <file name> For more details, see under “command, redirecting
output of a” [not shown]. Make the output of a command be the input of the next command:
<command name> | <next command name> For more details, see under “commands, pipelining of”
[not shown]. Make a command continue executing even after you log out: See “nohup” in man
pages. Change the priority of execution of a command: See “nice” in man pages. Abbreviate a
(typically long) command: alias <abbreviation> <command> Related See: “event” “process” “script”
BASIC OF UNIX
BASIC OF UNIX

directory
Definition of “directory”: See “directory, definition of” [not shown]. Appendix B — A Unix
Environment (Partial) 129 Tasks to find information about directories Display the name of the
current directory: pwd Display properties of current directory, including “permission”s: ls -l -d For
explanation of results, see “ls” in man pages. Display names of all directories below the current
directory having a given partial “pathname:” find . -name ’* <partial file name>* ’ -type d -print
Other tasks on directories Connect to a specified directory, i.e., make it the current directory: cd
<directory name> Connect to your login name’s “home directory”: cd Create a directory: mkdir
<directory name> Delete a directory: 1. Delete all files in the directory. 2. Enter: rmdir <directory
name> Copy a directory to floppy disk(s): See “bar”, “tar” commands in man pages. Copy a
directory from floppy disk(s) to hard disk: See “bar”, “tar” commands in man pages. Copy a
directory to another directory:Appendix B — A Unix Environment (Partial) 130 See “mount” in man
pages. Change permissions on a directory: See “chmod” in man pages. Related “file” “file system”
[not shown]
BASIC OF UNIX
BASIC OF UNIX

disk, hard
Definition of “hard disk”: See “disk, hard, definition of” [not shown]. Tasks to find information
about hard disks Display a listing of id’s of all hard disks you currently have access to: See “df” in
man pages. Find out memory usage on hard disk x du Other tasks on hard disks Copy a file to floppy
disk(s): See “bar”, “tar” commands in man pages. Copy a file from floppy disk(s) to hard disk: See
“bar”, “tar” commands in man pages. Related “main memory” [not shown]Appendix B — A Unix
Environment (Partial) 131 “RAM” [not shown] “ROM” [not shown]
BASIC OF UNIX
BASIC OF UNIX

file
Definition of “file”: See “file, definition of” [not shown]: Tasks to find information about files List
names of each file in current directory having string x in its name: ls * x* Display properties of a file:
ls -l <file name(s)> Display type of a file: See “file” in man pages. Display permissions for a file
named x: ls -l x Count number of lines, words, characters, in a file named x: wc x Display all lines in
a file which contain a specified string: grep <string> <file name> See also “awk” in man pages.
Search for information, patterns in a file See “grep”, “diff” in man pages. Other tasks on files Create
a file:Appendix B — A Unix Environment (Partial) 132 See “cat” in man pages, or use editor, e.g.,
vi. Copy a file within a given machine, server: cp <current file name> <new file name> Copy a file
across a network: See “cpio”, “ftp”, “bar”, “tar” in man pages. Copy a file to, from, floppy disks: For
file(s) occupying more than one disk, use “bar” command. (See man pages.) See also “tar” command
in man pages. Delete file(s): rm <file name(s)> Move file within a given machine, server: mv
<current file name> <new file name> Concatenate two or more files into a new file which contains
the originals in the order file1, file2, file3, ..., filen: cat file1, file2, file3, ..., filen > newfile Merge two
sorted files into a new, sorted file: See “sort” in man pages. Find a file: E.g., find, in any directory in
or below the present directory, all files whose name contains the string x, and print out the full name
of each such file: find . -name ’* *x* ’ -print Rename a file: mv <current name of file> <new name of
file> Change permissions on a file: chmod <new permissions mask> <file name>Appendix B — A
Unix Environment (Partial) 133 Display contents of a file named x: Use more x, or cat x, or head x,
or tail x or use editor, e.g., vi. Compare contents of two files: See “diff”, “cmp”, “comm” in man
pages. Find a string or other pattern in a file: grep <string> <file name> See also “awk” in man
pages. Change contents of a file: Use an editor, e.g., vi. See also “awk”, “sort” in man pages.
Compress a file. See “compress” in man pages. Related: “uncompress”. Display classification of a
file. See “file” in man pages. Display contents of a file. See “edit a file” below. Edit a file. See
“Emacs” [not shown], “FrameMaker” [not shown], “sed” [not shown], “Text Editor” [not shown],
“vi” [not shown]. Encode a binary file as ASCII for, e.g., transmission via e-mail See “uuencode” in
man pages. .Convert format of a file to Postscript format: See “enscript” in man pages. Establish file
creation permissions mask: See “umask” in man pages. Change permissions on a file:Appendix B —
A Unix Environment (Partial) 134 See “chmod” in man pages. Compress a file. See “compress” in
man pages. Related: “uncompress”. Rename file. mv <current file> <file of new name> Modify time-
related parameters of a file: See “touch” in man pages. Uncompress a file. See “uncompress” in man
pages. Related: “Compress” Related “directory” “file system” [not shown]
BASIC OF UNIX
BASIC OF UNIX

memory
process See “CD-ROM” [not shown], “disk”, “main memory” [not shown], “RAM” [not shown],
“ROM” [not shown], “floppy disk”.
Definition of “process”: See “process, definition of” [not shown]. Appendix B — A Unix
Environment (Partial) 135 Tasks to find information about processes Get a list of all current
processes: ps -auxww Other tasks on processes Abort a process: 1. Find the “PID” of the process by
entering: ps 2. Kill the process by entering: kill PID Related “command” “event” [not shown] “shell”
BASIC OF UNIX
BASIC OF UNIX

screen
Definition of “screen”: See “screen, definition of” [not shown]. Other tasks on screens Make a record
of everything that appears on the screen: Enter: script <name of file in which to record screen
contents> To terminate record, press: Ctrl-d Erase screen .Appendix B — A Unix Environment
(Partial) 136 .. Refresh screen ... Related “terminal” “windowing systems” [not shown]
BASIC OF UNIX
BASIC OF UNIX

script
Definition of “script”: See “script, definition of” [not shown]. Other tasks on scripts Create a script:
See “script, create a”. Edit a script: Use any editor, e.g., vi. View an existing script: See “script, view
a”. Set execute permissions on a script: See “script, set execute permissions on a” [not shown]. Run a
script: See “script, run a”. Debug a script: See “script, debug a”.Appendix B — A Unix Environment
(Partial) 137 Related “program”
BASIC OF UNIX
BASIC OF UNIX

shell
space Definition of “shell”: See “shell, definition of” [not shown]. Tasks to find information about
shells Display symbol identifying current shell: ps In result, “csh” stands for “C Shell” [not shown],
“sh” stands for “Bourne Shell” [not shown], “ksh” stands for “Korn Shell” [not shown]. Other tasks
on shells Write a program using shell commands: See “script”. Related “Bourne Shell” [not shown]
“C Shell” [not shown] “Korn Shell” [not shown]
See “disk”, “main memory” [not shown], “RAM” [not shown], “ROM” [not shown]. Appendix B —
A Unix Environment (Partial) 138
BASIC OF UNIX
BASIC OF UNIX

terminal
user Definition of “terminal” See “terminal, definition of” [not shown]. Tasks to find information
about terminals Display a list of names or id’s of all terminals on system: ... Find out who owns a
given terminal: ... Find out what terminals are assigned to a given user: ... Find out name, id,
properties of your current terminal ... Sign on to another user’s terminal: ... Related “screen”
“workstation” [not shown]
Definition of “user”, i.e., assumed minimum vocabulary and skills of any user of this Unix
Environment: Appendix B — A Unix Environment (Partial) 139 See “user, definition of”. Tasks to
find information about users Display list of names of other users ... Other tasks on users Send
message to other user(s): See “e-mail” [not shown], “mail” [not shown]. Make up a mailing list of
users: See “alias” in man pages. Sign on to another user’s terminal rlogin <name of user’s terminal>
Related “superuser” [not shown] “system administrator” [not shown]
BASIC OF UNIX
BASIC OF UNIX

variable, Environment
Definition of Environment variable: See “variable, Environment, definition of” [not shown]. Tasks to
find information about Environment variables List all current Environment variables:
printenvAppendix B — A Unix Environment (Partial) 140 Other tasks on Environment variables
Create an Environment variable setenv <Environment variable name> <value> Change the value of
an Environment variable: setenv <Environment variable name> <value> Make recently entered
values of Environment variables take effect throughout current shell: source Related “script” “script
variables” “shell”

You might also like