1.5. Beginner s Guide

 < Day Day Up > 

1.5. Beginner's Guide

If you're just beginning to work on a Unix system, the abundance of commands might prove daunting. To help orient you, the following lists present a small sampling of commands on various topics.

1.5.1. Communication

ftp

Interactive file transfer program.

login

Sign on to Unix.

mailx

Read or send mail.

slogin

Sign on to remote Unix using secure shell.

ssh

Connect to another system, securely.


1.5.2. Comparisons

cmp

Compare two files, byte by byte.

comm

Compare items in two sorted files.

diff

Compare two files, line by line.

diff3

Compare three files.

dircmp

Compare directories.

sdiff

Compare two files, side by side.


1.5.3. File Management

cd

Change directory.

chgrp

Change file group.

chmod

Change access modes on files.

chown

Change file owner.

cksum

Print a file checksum, POSIX standard algorithm.

cp

Copy files.

csplit

Break files at specific locations.

file

Determine a file's type.

head

Show the first few lines of a file.

less

A sophisticated interactive pager program for looking at information on a terminal, one screenful (or "page") at a time. The name is a pun on the more program.

ln

Create filename aliases.

locate

Find a file somewhere on the system based on its name. The program uses a database of files that is usually automatically rebuilt, nightly.

ls

List files or directories.

md5sum

Print a file checksum using the Message Digest 5 (MD5) algorithm.

mkdir

Create a directory.

more

Display files by screenful.

mv

Move or rename files or directories.

pwd

Print working directory.

rm

Remove files.

rmdir

Remove directories.

scp

Copy files to remote system securely.

split

Split files evenly.

tail

Show the last few lines of a file.

wc

Count lines, words, and characters.


1.5.4. Miscellaneous

banner

Make posters from words.

bc

Arbitrary precision calculator.

cal

Display calendar.

calendar

Check for reminders.

clear

Clear the screen.

info

The GNU Info system for online documentation.

man

Get information on a command.

nice

Reduce a job's priority.

nohup

Preserve a running job after logging out.

passwd

Set your login password.

script

Produce a transcript of your login session.

spell

Report misspelled words.

su

Switch to a different user.


1.5.5. Printing (BSD Commands)

lpr

Send to the printer.

lpq

Get printer status.

lprm

Cancel a printer request.

pr

Format and paginate for printing.


1.5.6. Printing (System V Commands)

cancel

Cancel a printer request.

lp

Send to the printer.

lpstat

Get printer status.

pr

Format and paginate for printing.


1.5.7. Programming

cc

C compiler.

ctags

C function references (for vi).

ld

Loader.

lex

Lexical analyzer generator.

make

Execute commands in a specified order.

od

Dump input in various formats.

splint

C program analyzer.

strace

Trace signals and system calls.

strip

Remove data from an object file.

truss

Trace signals and system calls.

yacc

Parser generator. Can be used with lex.


1.5.8. Searching

egrep

Extended version of grep.

fgrep

Search files for literal words.

find

Search the system for filenames matching patterns or attributes.

grep

Search files for text patterns.

strings

Display text strings found in binary files.


1.5.9. Shells

Bourne family shells:

bash

The GNU Project's Bourne Again Shell.

ksh

The Korn shell, either an original or clone, depending upon the operating system.

pdksh

The Public Domain Korn shell.

sh

The original Bourne shell, particularly on commercial Unix systems.

zsh

The Z-shell.


C shell family shells:

csh

The original BSD C shell.

tcsh

The "Tenex" C shell: a much-enhanced version of csh.


1.5.10. Shell Programming

basename

Print the last component of a pathname, optionally removing a suffix.

dirname

Print all but the last component of a pathname.

echo

Repeat command-line arguments on the output.

expr

Perform arithmetic and comparisons.

id

Print user and group ID and name information.

line

Read a line of input.

printf

Format and print command-line arguments.

sleep

Pause during processing.

test

Test a condition.


1.5.11. Storage

bunzip2

Expand files compressed with bzip2 (.bz2 files).

bzip2

Very high quality file compression program.

cpio

Copy archives in or out.

gunzip

Expand compressed (.gz and .Z) files.

gzcat

Display contents of compressed files (may be linked to zcat).

gzip

Compress files to free up space.

tar

File tree and tape archiver.

zcat

Display contents of compressed files.


1.5.12. System Status

at

Execute commands later.

crontab

Automate commands.

date

Display or set date.

df

Show free disk space.

du

Show disk usage.

env

Show environment variables.

finger

Display information about users.

kill

Terminate a running command.

ps

Show processes.

stty

Set or display terminal settings.

who

Show who is logged on.


1.5.13. Text Processing

awk

A pattern-matching programming language for working with text files.

cat

Concatenate files or display them.

cut

Select columns for display.

ex

Line editor underlying vi.

fmt

Produce roughly uniform line lengths.

iconv

General-purpose character-encoding conversion tool.

join

Merge different columns into a database.

paste

Merge columns or switch order.

sed

Noninteractive text editor.

sort

Sort or merge files.

tr

Translate (redefine) characters.

uniq

Find repeated or unique lines in a file.

vi

Visual text editor.

xargs

Process many arguments in manageable portions.


     < Day Day Up > 


    Unix in a Nutshell
    Unix in a Nutshell, Fourth Edition
    ISBN: 0596100299
    EAN: 2147483647
    Year: 2005
    Pages: 201

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net