Tiny Unix Reference

download tiny-unix-reference.zip (9 Kb)

Index

  1. Abstract
  2. Unix Commands (just a few)
  3. Unix User Rights
  4. Remote Connection Commands
  5. Internet Protocol Numbers
     

 

Abstract

This Document provides a quick Reference to  Unix Shell (sh) Commands and a Basic Reference to Application specific commands, HowTo implement User Rights and an Internet Protocol Listing.

[ top ]

 

Unix Commands (just a few)

cat [options] file concatenate (list) a file
cd [directory] change directory
chgrp [options] group file change the group of the file
chmod [options] file change file or directory access permissions
chown [options] owner file change the ownership of a file; can only be done by the superuser
chsh (passwd -e/-s) username login_shell change the user's login shell (often only by the superuser)
cmp [options] file1 file2 compare two files and list where differences occur (text or binary files)
compress [options] file compress file and save it as file.Z
cp [options] file1 file2 copy file1 into file2; file2 shouldn't already exist. This command creates or overwrites file2.
cut (options) [file(s)] cut specified field(s)/character(s) from lines in file(s)
date [options] report the current date and time
dd [if=infile] [of=outfile] [operand=value] copy a file, converting between ASCII and EBCDIC or swapping byte order, as specified
diff [options] file1 file2 compare the two files and display the differences (text files only)
df [options] [resource] report the summary of disk blocks and inodes free and in use
du [options] [directory or file] report amount of disk space in use
echo [text string] echo the text string to stdout
ed or ex [options] file Unix line editors
emacs [options] file full-screen editor
expr arguments evaluate the arguments. Used to do arithmetic, etc. in the shell.
file [options] file classify the file type
find directory [options] [actions] find files matching a type or pattern
finger [options] user[@hostname] report information about users on local and remote machines
ftp [options] host transfer file(s) using file transfer protocol
grep [options] 'search string' argument

egrep [options] 'search string' argument

fgrep [options] 'search string' argument

search the argument (in this case probably a file) for all occurrences of the search string, and list them.
gzip [options] file

gunzip [options] file

zcat [options] file

compress or uncompress a file. Compressed files are stored with a .gz ending
head [-number] file display the first 10 (or number of) lines of a file
hostname display or set (super-user only) the name of the current machine
kill [options] [-SIGNAL] [pid#] [%job] send a signal to the process with the process id number (pid#) or job control number (%n). The default signal is to kill the process.
ln [options] source_file target link the source_file to the target
lpq [options]

lpstat [options]

show the status of print jobs
lpr [options] file

lp [options] file

print to defined printer
lprm [options]

cancel [options]

remove a print job from the print queue
ls [options] [directory or file] list directory contents or file permissions
mail [options] [user]

mailx [options] [user]

Mail [options] [user]

simple email utility available on Unix systems. Type a period as the first character on a new line to send message out, question mark for help.
man [options] command show the manual (man) page for a command
mkdir [options] directory make a directory
more [options] file

less [options] file

pg [options] file

page through a text file
mv [options] file1 file2 move file1 into file2
od [options] file octal dump a binary file, in octal, ASCII, hex, decimal, or character mode.
passwd [options] set or change your password
paste [options] file paste field(s) onto the lines in file
pr [options] file filter the file and print it on the terminal
ps [options] show status of active processes
pwd print working (current) directory
rcp [options] hostname remotely copy files from this machine to another machine
rlogin [options] hostname login remotely to another machine
rm [options] file remove (delete) a file or directory (-r recursively deletes the directory and its contents) (-i prompts before removing file
rmdir [options] directory remove a directory
rsh [options] hostname remote shell to run on another machine
script file saves everything that appears on the screen to file until exit is executed
sed [options] file stream editor for editing files from a script or from the command line
sort [options] file sort the lines of the file according to the options chosen
source file

. file

read commands from the file and execute them in the current shell. source: C shell, .: Bourne shell.
strings [options] file report any sequence of 4 or more printable characters ending in <NL> or <NULL>. Usually used to search binary files for ASCII strings.
stty [options] set or display terminal control options
tail [options] file display the last few lines (or parts) of a file
tar key[options] [file(s)] tape archiver--refer to man pages for details on creating, listing, and retrieving from archive files. Tar files can be stored on tape or disk.
tee [options] file copy stdout to one or more files
telnet [host [port]] communicate with another host using telnet protocol
touch [options] [date] file create an empty file, or update the access time of an existing file
tr [options] string1 string2 translate the characters in string1 from stdin into those in string2 in stdout
uncompress file.Z uncompress file.Z and save it as a file
uniq [options] file remove repeated lines in a file
uudecode [file] decode a uuencoded file, recreating the original file
uuencode [file] new_name encode binary file to 7-bit ASCII, useful when sending via email, to be decoded as new_name at destination
vi [options] file visual, full-screen editor
wc [options] [file(s)] display word (or character or line) count for file(s)
whereis [options] command report the binary, source, and man page locations for the command named
which command reports the path to the command or the shell alias in use
who or w report who is logged in and what processes are running
zcat file.Z concatenate (list) uncompressed file to screen, leaving file compressed on disk

[ top ]

 

Unix User Rights

Pos.
...gibt Antwort auf die Frage:
Bsp.

Benutzer-/Gruppe:

 

    u    für den Eigentümer

      g    für die Gruppe, der die Datei angehört

        o    für alle anderen Benutzer

          a    für alle Benutzer des Systems


Aktion:
 

    +    für "Rechte hinzufügen"

      -    für "Rechte entziehen"

        =    für alle Rechte setzen


Rechte:
 

    r    für readable, lesbar

      w    für writeable, beschreibbar

        x    für executeable, ausführbar

1 Für directory (d) und für File (-) eingeben! d, - Directory: drwxr-xr-x
File: -rw-rwxr--

chmod: change modus


go: group and others


Für das Ändern der Zugriffsrechte gibt es Möglichkeiten:

chmod go-x Privat/, chmod go+rx Privat/, chmod 700 Privat/
 
2 Hat der Besitzer das Leserecht? r chmod -r--------
3 Hat der Besitzer das Schreibrecht? w chmod -rw-------
4 Hat der Besitzer die Ausführererlaubnis? x chmod -rwx------
5 Haben Leute der gleichen Benutzergruppe das Leserecht? r chmod -rwxr-----
6 Haben Leute der gleichen Benutzergruppe das Schreibrecht? w chmod -rwxrw----
7 Haben Leute der gleichen Benutzergruppe die Ausführerlaubnis? x chmod -rwxrwx---
8 Haben andere aussenstehende Personen das Leserecht? r chmod -rwxrwxr--
9 Haben andere aussenstehende Personen das Schreibrecht? w chmod -rwxrwxrw-
10 Haben andere aussenstehende Personen die Ausführerlaubnis? x chmod -rwxrwxrwx

[ top ]

 

Remote Connection Commands

 

Command/Syntax
What it will do
finger[opions]user[@hostname report information about users on local and remote machines
ftp[options]host transfer file(s) using file transfer protocol
rcp[options]hostname remotely copy files from this machine to another machine
rsh[options]hostname remote shell to run on another machine
rlogin[options]hostname login remotely to another machine
telnet[host[port]] communicate with another host using telnet protocol

[ top ]

 

Internet Protocol Numbers

 

Protokoll Nr.

Kürzel

Protokoll Name

1

ICMP Internet Control Message Protocol

2

IGMP Internet Group Management Protocol

3

GGP Gateway-to-Gateway Protocol

4

IP IP in IP (encapsulation)

5

ST Stream

6

TCP Transmission Control Protocol

7

UCL UCL

8

EGP Exterior Gateway Protocol

9

IGP any private interior gateway p.

10

BBN-RCC-MON BBN RCC Monitoring

11

NVP-II Network Voice Protocol

12

PUP PUP

13

ARGUS ARGUS

14

EMCON EMCON

15

XNET Cross Net Debugger

16

CHAOS Chaos

17

UDP User Datagram Protocol

18

MUX Multiplexing

19

DCN-MEAS DCN Measurement Subsystems

20

HMP Host Monitoring Protocol

21

PRM Packet Radio Measurement

22

XNS-IDP XEROX NS IDP
<

23

TRUNK-1 Trunk-1

24

TRUNK-2 Trunk-2

25

LEAF-1 Leaf-1

26

LEAF-2 Leaf-2

27

RDP Reliable Data Protocol

28

IRTP Internet Reliable Transaction P.

29

ISO-TP4 ISO Transport Protocol Class 4

30

NETBLT Bulk Data Transfer Protocol

31

MFE-NSP MFE Network Services Protocol
<

32

MERIT-INP MERIT Internodal Protocol
<

33

SEP Sequential Exchange Protocol

34

3PC Third Party Connect Protocol

35

IDPR Inter-Domain Policy Routing Protocol

36

XTP XTP

37

DDP Datagram Delivery Protocol

38

IDPR-CMTP IDPR Control Message Transport Protocol

39

TP++ TP++ Transport

40

IL IL Transport Protocol

41

SIP Simple Internet Protocol

42

SDRP Source Demand Routing Protocol

43

SIP-SR SIP Source Route

44

SIP-FRAG SIP Fragment

45

IDRP Inter-Domain Routing Protocol

46

RSVP Reservation Protocol

47

GRE General Routing Encapsulation

48

MHRP Mobile Host Routing Protocol

49

BNA BNA

50

SIPP-ESP SIPP Encap Security Payload

51

SIPP-AH SIPP Authentication Header

52

I-NLSP Integrated Net Layer Security Protocol

53

SWIPE IP with Encryption

54

NHRP NBMA Next Hop Resolution Protocol

55-60

  Unassigned

61

  any host internal protocol

62

CFTP CFTP

63

  any local network

64

SAT-EXPAK SATNET and Backroom EXPAK

65

KRYPTOLAN Kryptolan

66

RVD MIT Remote Virtual Disk Protocol

67

IPPC Internet Pluribus Packet Core

68

  any distributed file system

69

SAT-MON SATNET Monitoring

70

VISA VISA Protocol

71

IPCV Internet Packet Core Utility

72

CPNX Computer Protocol Network Executive
<

73

CPHB Computer Protocol Heart Beat

74

WSN Wang Span Network

75

PVP Packet Video Protocol

76

BR-SAT-MON Backroom SATNET Monitoring

77

SUN-ND SUN ND PROTOCOL-Temporary

78

WB-MON WIDEBAND Monitoring

79

WB-EXPAK WIDEBAND EXPAK

80

ISO-IP ISO Internet Protocol

81

VMTP VMTP

82

SECURE-VMTP SECURE-VMTP

83

VINES VINES

84

TTP TTP

85

NSFNET-IGP NSFNET-IGP

86

DGP Dissimilar Gateway Protocol

87

TCF TCF

88

IGRP IGRP

89

OSPFIGP OSPFIGP

90

Sprite-RPC Sprite RPC Protocol

91

LARP Locus Address Resolution Protocol

92

MTP Multicast Transport Protocol

93

AX.25 AX.25 Frames

94

IPIP IP-within-IP Encapsulation Protocol

95

MICP Mobile Internetworking Control Protocol

96

SCC-SP Semaphore Communications Sec. Protocol

97

ETHERIP Ethernet-within-IP Encapsulation

98

ENCAP Encapsulation Header

99

  any private encryption scheme

100

GMTP GMTP

101-254

  Unassigned
<

255

  Reserved