psychotics-unix-bible.txt

(79 KB) Pobierz
 Psychotic's Unix Bible Writen by Virtual Circuit

*  Psychotic's Unix Bible writen by Virtual Circuit.  This document may not be changed in any way. You may distribute this unix bible as much as you like, I wrote it as a reference for the public and that's how I want it to remain. Any questions you have regarding this text you may reach me at rhat@cts.com.
*

A list of commands and a quick description

alias  ......... this allows the user view the current aliases
awk ............ this allows the user to search for a pattern within a file
bdiff .......... compares two large files
bfs ............ scans a large file
cal ............ shows a calendar
cat ............ concatenates and  prints a file
cc ............. c compiler
cd ............. changes directories
chgrb .......... changes a file groups ownership
chmod .......... changes the permission on a file
chown .......... changes the individual ownership of a file
cmp ............ compairs two files
comm ........... compares two files so as to determine which lines are common to 			both
cp ............. copies file to another location
cu ............. calls another unix sysytem
date ........... returns the date and time
df ............. shows all mounted drives on your machine
diff ........... displays the diference between two files
du ............. shows the disk usage in blocks for a directory
echo ........... echoes the data to the screen or file
ed ............. text editor
env ............ lists the current environment variables
ex ............. another text editor
expr ........... evaluates a mathmatical formula
find ........... finds a file
f77 ............ fortran complier
format ......... initializes a floppy disk
grep ........... searches for a pattern within a file
help ........... gives help
kill ........... stops a running process
ln ............. creates a link between two files
lpr ............ copies the file to the line printer
ls ............. lists the files in a directory
mail ........... allows the user to send/receive mail
mkdir .......... makes directory
more ........... displays a data file to the screen
mv ............. used to move or rename files
nohup .......... allows a command to continue running even when you log out
nroff .......... used to format text
passwd ......... changes your password
pkgadd ......... installs a new program onto your machine
ps ............. Lists the current processes running
pwd ............ displays the name of the working directory
rm ............. removes files
rmdir .......... removes directories
set ............ lists all the variables in the current shell
setenv ......... sets the environment variables
sleep .......... causes a process to become inactive
source ......... allows the user to execute a file and update any changed values                                    			in that file
sort ........... sorts files
spell .......... checks for spelling errors in a file
split .......... divides a file
stty ........... sets the terminal options
tail ........... displays the end of a file
tar ............ copies all specified files into one
touch .......... creates an empty file or updates the time/date stamp on a file
troff .......... outputs formatted output
tset ........... sets the terminal type
umask .......... specify a new creation mask
uniq ........... compairs two files
uucp ........... unix to unix execute
vi ............. full screen editor
vipw ........... opens the vi editor as well as password file for editing
volcheck ....... checks to see if there is a floppy disk mounted to your machine
wc ............. displays detail in the full size
who ............ inf. on other people online
write .......... send a message to another user
! .............. repeats commands


More commands with a better description (Not all commands are listed):

cat: -b, --number-nonblank

Number all nonblank output lines, starting with 1. 

-e 
Equivalent to -vE. 

-n, --number
Number all output lines, starting with 1. 

-s, --squeeze-blank
Replace multiple adjacent blank lines with a single blank line. 

-t 
Equivalent to -vT. 

-u 
Ignored; for Unix compatibility. 

-v, --show-nonprinting
Display control characters except for LFD and TAB using `^' notation and      precede characters that have the high bit set with `M-'. 

-A, --show-all
Equivalent to -vET. 

-E, --show-ends
Display a `$' after the end of each line. 

-T, --show-tabs
Display TAB characters as `^I'. 

--help
Print a usage message and exit with a status code indicating success. 

--version
Print version information on standard output then exit.

cd: directory becomes the new working directory. The process must have execute (search) permission in directory. If cd is used without arguments, it returns you to your login directory. In csh you may specify a list of directories in which directory is to be sought as a subdirectory if it is not a subdirectory of the current directory; see the description of the cdpath variable in csh.

chmod: The format of a symbolic mode is `[ugoa...][[+=][rwxXstugo...]...][,...]'. Multiple symbolic operations can be given, separated by commas. 

A combination of the letters `ugoa' controls which users' access to the file will be changed: the user who owns it (u), other users in the file's group (g), other users not in the file's group (o), or all users (a). If none of these are given, the effect is as if `a' were given, but bits that are set in the umask are
not affected. 

The operator `+' causes the permissions selected to be added to the existing permissions of each file; `-' causes them to be removed; and `=' causes them to be the only permissions that the file has. 

The letters `rwxXstugo' select the new permissions for the affected users: read (r), write (w), execute (or access for directories) (x), execute only if the file is a directory or already has execute permission for some user (X), set user or group ID on execution (s), save program text on swap device (t), the permissions that the user who owns the file currently has for it (u), the permissions that other users in the file's group have for it (g), and the permissions that other users not in the file's group have for it (o). 

A numeric mode is from one to four octal digits (0-7), derived by adding up the bits with values 4, 2, and 1. Any omitted digits are assumed to be leading zeros. The first digit selects the set user ID (4) and set group ID (2) and save text image (1) attributes. The second digit selects permissions for the user who owns the file: read (4), write (2), and execute (1); the third selects permissions for
other users in the file's group, with the same values; and the fourth for other users not in the file's group, with the same values. 

chmod never changes the permissions of symbolic links; the chmod system call cannot change their permissions. This is not a problem since the permissions of symbolic links are never used. However, for each symbolic link listed on the command line, chmod changes the permissions of the pointed to file. In contrast, chmod ignores symbolic links encountered during recursive directory traversals. 

OPTIONS
-c, --changes
Verbosely describe only files whose permissions actually change. 

-f, --silent, --quiet
Do not print error messages about files whose permissions cannot be changed. 

-v, --verbose
Verbosely describe changed permissions. 

-R, --recursive
Recursively change permissions of directories and their contents. 

--help
Print a usage message on standard output and exit successfully. 

--version
Print version information on standard output then exit successfully. 

clear: clear clears your screen if this is possible. It looks in the environment for the terminal type and then in /etc/termcap to figure out how to clear the screen. 

date: This manual page documents the GNU version of date. date with no arguments prints the current time and date (in the format of the `%c' directive described below). If given an argument that starts with a `+', it prints the current time and date in a format controlled by that argument, which has the same format as the format string passed to the `strftime' function. Except for directives that start with `%', characters in that string are printed unchanged. 

The directives are: 

% 
a literal % 

n 
a newline 

t 
a horizontal tab 

Time fields: 

%H 
hour (00..23) 

%I 
hour (01..12) 

%k 
hour ( 0..23) 

%l 
hour ( 1..12) 

%M 
minute (00..59) 

%p 
locale's AM or PM 

%r 
time, 12-hour (hh:mm:ss [AP]M) 

%s 
seconds since 1970-01-01 00:00:00 UTC (a nonstandard extension) 

%S 
second (00..61) 

%T 
time, 24-hour (hh:mm:ss) 

%X 
locale's time representation (%H:%M:%S) 

%Z 
time zone (e.g., EDT), or nothing if no time zone is determinable 

Date fields: 

%a 
locale's abbreviated weekday name (Sun..Sat) 

%A 
locale's full weekday name, variable length (Sunday..Saturday) 

%b 
locale's abbreviated month name (Jan..Dec) 

%B 
locale's full month name, variable length (January..December) 

%c 
locale's date and time (Sat Nov 04 12:02:33 EST 1989) 

%d 
day of month (01..31) 

%D 
date (mm/dd/yy) 

%h 
same as %b 

%j 
day of year (001..366) 

%m 
month (01..12) 

%U week number of year with Sunday as first day of week (00..53) 

%w 
day of week (0..6) with 0 corresponding to Sunday 

%W 
week number of year with Monday as first day of week (00..53) 

%x 
locale's date representation (mm/dd/yy) 

%y 
last two digits of year (00..99) 

%Y 
year (1970...) 

By default, date pads numeric fields with zeroes. GNU date recognizes the following nonstandard numeric modifiers: 

- 
(hyphen) do not pad the field 

_ 
(underscore) pad the field with spaces 

If given an argument that does not start with `+', date sets the system clock to the time and date specified by that argument. The argument must consist entirely of digits...
Zgłoś jeśli naruszono regulamin