Está en la página 1de 3

"Advanced" UNIX

commands
Words with an (*) after is explained at the bottom of the page

Command Comments
This is a must for the advanced user, it contains almost all necessary
information about the command you specify, make sure you see the
man "see also" list in the man-page for references to related functions.
Interesting options:
-f: lists all available references(*1) for the specified command.
whatis Searches a database for keywords, generated upon the man pages.
Searches a database, but in addition to whatis (described above) also
apropos
searches the descriptions.

locate is a file-location tool. Find the file you're looking for on a vast
locate
system, in milliseconds, by searching a database.
find is also a file-location tool. It does an actual search, much slower,
find
but always updated.

Shows what will be executed if specified command is entered.


type Interesting options:
-a: shows all possibilities, also the ones not executed
which locate a command, display its pathname or alias

ps list current running processes, and their pids(*2).


Used for terminating processes which are hung. Takes pid(*2) as
input argument.
kill
Interesting options:
-KILL: if the process do not react to a normal kill, try this
Same as kill, but kills by name of process (therefore all conforming to
killall
this name), instead of by pid(*2).

Displays the last 10 lines of a file.


Interesting options:
tail
-n number of lines to display
-f follows the file, even when it is updated
Displays the first 10 lines of a file. Same as tail, but takes the top,
instead of the bottom of the file. The -f option naturally doesn't exist
head
Interesting options:
-n number of lines to display
Simply displays the raw file-contents on your terminal. Great for text
cat
files, garbaged for binaries.
"More is less, and less is more." -- UNIX hearsay
more and less is programs used to break up long text files, into screen
more/less
size bits, for display. Especially useful when piped(*4) from other
commands, to break their output down.
Print the lines which matches input argument, if no second argument
is given read from standard input(*3).
grep Interesting options:
-e inverts the output
-n prints line information

Summarize disk usage. This directory and below.


Interesting options:
du -s: display only the summarized size of the files
-h: Human readable, displays the size in the most suitable form. (kB,
MB, etc...)
Summarize free disk space. If any file is given as input argument, df
df
will print only the information concerning the disk where it is located.

Shows a summary of users logged on, along side with some cpu and
w
memory usage information.
Displays all login and logout information about users and terminals,
last
as a logon history.
write writes a message to user (optionally on the specified terminal)

vi, vim,
Some text editors for UNIX. I use emacs, it's also advisable to
elvis, pico,
learn vi, because it exists on every UNIX version. (At least so I'm
joe, jed,
told)
emacs

Explanations:

1. There may be more than one page referred to by one function name
2. PID - "Process IDentification number" the unique identifier for the process
running.
3. Standard input is for all normal purposes your keyboard.
4. Piping - is a UNIX speciallity, allowing you to let "any" device be redirected
to another. E.g. letting all your screen output be dumped to a file.

También podría gustarte