| Command | Meaning |
|---|---|
| shutdown | brings the system down in a secure way |
| reboot | brings the system down in a secure way and then up again |
| halt | depending on parameter it stops the system, reboots or takes the power off |
| init | brings the system to the specified
runlevel, that means, reboots the system and executes the commands
in the corresponding /etc/rcn.d/-directory - this
may differ for example for Linux; rc ... resource control |
| poweroff | brings the system down and takes the power off |
| useradd | administer a new user login on the system, adds an entry to /etc/passwd and /etc/shadow, that can be modified by vipw or usermod |
| userdel | removes a user login from the system |
| Command | Meaning | DOS equivalent |
|---|---|---|
| cat | concatenate and display | type |
| cd, chdir | change working directory | cd |
| chmod | change file mode (access permission) | attrib |
| chgrp | change group ID of a file | |
| chown | change owner of a file | |
| cp | copy file(s) | copy |
| file | determine file type | |
| find | find files | |
| head | display first lines of file (file heading) | |
| ln [-s] | make (symbolic) links (BSD) | |
| ls | list directory content | dir |
| mkdir | create (make) a directory | md |
| more | page output to screen or display file pagewise | type file | more |
| mv | move or rename a file or directory | ren |
| pg | page output to screen or display file pagewise | like more |
| rm [-r] | remove files (and directories recursively) | del [deltree] |
| rmdir | remove (empty) directories | rd |
| tail | display last lines of file (file tail) | |
| tee | I/O redirection: read stdin and write to stdout and file(s) |
Attention:
There is no undelete in UNIX! (use
rm,
mv and
cp with
-i and set
noclobber!)
And there is no way to find the date or time a file was created, you only can
find the date or time a file was last modified (by using ls -l)!
| Command | Meaning |
|---|---|
| awk | search text for patterns and perform operations (Authors: Aho, Weinberger and Kernighan) |
| diff | list differences between two files |
| echo [-n] [\c] | sends arguments back to stdout (without NEWLINE) |
| grep | global regular expression printer: search a file for a pattern |
| send and receive e-mails | |
| news | write system news items to stdout |
| sed | stream editor (noninteractive) |
| sort | sort or merge files |
| spell | find spelling errors |
| split | split large files |
| uniq | report repeated lines in a file (lies that are not unique) |
| vi | visual: screen editor |
| wc | word, character and line counter |
| write | send (write) messages to other users who are logged on |
| Command | Meaning |
|---|---|
| at | run command(s) at a later time |
| cmp | compare two files |
| crontab | modifies or displays the cron table |
| date | give back the system date and time |
| df | disk free capacity |
| du | disk usage |
| env | display the current environment variables |
| exit | terminate (exit) current shell (= logout in login shell) |
| finger | general information about users |
| mesg [yn] | deny or accept messages |
| nice | run a command at a different priority |
| passwd | changes the current password |
| ps | display process status (e.g. ps auxww | grep pattern) |
| pwd | print working directory |
| stty | set (or display) terminal characteristics (terminal type) |
| tset | terminal set program |
| tty | display special device corresponding to current terminal |
| which, whereis | gives pathname corresponding to command |
| who, w | who is logged onto UNIX |
| Command | Meaning |
|---|---|
| ar | archive and library maintainer |
| cc | C compiler |
| fc, f77 | FORTAN (77) compiler |
| make | maintains, updates, and regenerates groups of programs |
| nm | lists defined names in object files |
| size | size of an object |
| Variable | Shell(s) | Description |
|---|---|---|
| CDPATH (cdpath) | any | specifies shorthand names for commonly accessed directories |
| ENV | K | specifies the pathname of the secondary startup file (also known as the environment file). The default is .kshrc (Korn shell) |
| HISTSIZE | K | specifies the number of commands to maintain in the history file |
| HOME (home) | any | your home directory |
| MAIL (mail) | any | name of the file in which the system stores your mail |
| MAILCHECK | B | value specifying how often system checks mail |
| MAILPATH | B | specifies a directory; if mail arrives in that directory, the mail program notifies user |
| PATH (path) | any | specifies the search path for executable files |
| PSl (prompt) | any | value of the shell prompt |
| PS2 | B,K | value of the secondary shell prompt.The C shell does not let you modify the secondary prompt |
| PWD (cwd) | any | value of the current working directory |
| SHELL (shell) | any | pathname of the shell (used when certain utilities provide a shell escape) |
| TERM | any | specifies your type of terminal |
| TMOUT | K | specifies the number of seconds before the shell times out and logs out the user in the absence of keyboard input |
| TZ (time) | any | sets your time zone |
| VISUAL | K | specifies the editor used for interactive command line editing |
Example:
$ cd $ pwd /disk1/users/peter $ ls F90 bin help.txt info pub util work $ ls -a . bin help.txt pub work .. F90 info util $ ls -l drwxr----- 3 peter edvz 3340 Apr 22 2005 F90 drwxr--r-- 2 peter edvz 1024 Apr 23 2005 bin -rw-rw-r-- 1 root edvz 425 Apr 22 2005 help.txt -rw-rw---- 1 peter edvz 1256 Apr 22 2004 info drwxrwxrwx 2 peter edvz 1024 Apr 22 2005 pub drwx------ 2 peter edvz 1024 Apr 22 2005 util drwxr----- 2 peter edvz 1024 Sep 8 10:13 work $ chmod 770 util $ ls -l util drwxrwx--- 2 peter edvz 1024 Apr 22 2005 util $ mv help.txt READ.ME $ ls F90 READ.ME bin info pub util work $ chmod g-w,o-r READ.ME $ ls -l READ.ME -rw-r----- 1 peter edvz 425 Apr 22 2005 READ.ME
As you can see, there are 2 modes for chmod to change the file mode:
so chmod 750 file1 sets read and execute permission for user and group and write permission for user only (750 = 400+200+100+040+010).
chmod g+x file1 adds execute
permission for group to file1
chmod a=r file2 sets only read
permission for all to file2
chmod o=u file3 sets permissions
for others to file3 to user permission