EAUAU


    ..I've got a hole in my pocket..

    Ringo Starr, Beatles, Yellow Submarine 1968


01. Files and folders
---------------------

pwd, cd ( . , .. , ~ , ~user), mkdir (-p)
ls ( -l, -d, -a, -i, -1, --color)
ln ( -s)
cp, mv, rm ( -f, -r), touch
cmp, diff, patch (-pN)
find

Filesystem

  /            root directory
    /bin       programs
    /boot      kernel
       grub    bootloader
    /etc       configuration files
       X11     graphics
    /home      users home
    /lib       libraries
    /mnt       mount here
    /root      root's home
    /sbin      system programs
    /tmp       temporary
    /proc      some kernel tables, switches, report (in RAM)
    /usr       level 2
       bin
       sbin
       lib
       local   level 3
          bin
        lib
        sbin
       src
    var        log files, cache, chrooted files, ...


02. Files and Folders. Properties and access rights
    -----------------------------------------------

chown, chgrp, chmod (744, +x, +s)

-rw-------  1 virtu    virtu       289 2008-09-21 17:27 .bash_history

drwxr-xr-x  2 root     root         80 2008-10-12 14:00 bsg
lrwxrwxrwx  1 root     root          3 2008-10-12 14:00 cdrom -> sr0
brw-rw----  1 root     floppy   2,   0 2008-10-12 14:00 fd0
srw-rw-rw-  1 root     root          0 2008-10-12 14:00 log
crw-rw----  1 root     uucp     4,  64 2008-10-12 14:00 ttyS0


03. stdin, stdout, stderr
    ---------------------
>, >>, <, |, (0<, 1>, 2>), |&, >&, >>& (2>&1), tee


04. Arhives
    -------

tar (c v f x j z), bzip2 (-d), gzip (-d), cpio
7za (p7zip), unrar


05. Filesystems
    -----------

fdisk, mkfs.ext3, mkswap, fsck,
dd ( if=/dev/zero if=/dev/random if=/dev/sda if=/dev/sdb1,
     of=/dev/null bs=512 count=63)
df, du ( -s),
mount (-o, -t, /etc/fstab), umount

/etc/fstab
/dev/sda1     /        ext3    defaults    1 1
/dev/sda2     swap     swap    defaults    0 0


06. Text editors
    ------------

vi, ed, nano


07. Scripts
    -------

#!/bin/bash,
variables,
"", '', ``
test (-lt -le -eq -ge -gt),
if .. ; then .. ; fi
while .. ; do .. ; done
for $x in .. ; do .. ; done
seq,
expr (index length match substr)


08. Filters and LOGs
    ----------------

grep (-i, -v, -r, -l -n -H) 'regexp' [filename]
( ^  $ . [A-Za-z] [0123] [^A] () | )

cat (-n), wc (-l, -c, -w), less, more, head (-n 3), tail (-n)
tr, sed, gawk '{ print $3,$1 }', sort, uniq (-u), paste

/var/log/messages,
/var/log/Xorg ...


09. Users
    -----

useradd, userdel, passwd, su (-)

/etc/passwd
root:x:0:0:root:/root:/bin/bash
kasutaja:x:500:500::/home/kasutaja:/bin/bash

/etc/group
root:x:0:root
kasutaja:x:500:


10. Protsess
    --------

ps (-A), kill (-9), killall, top, nice, job, fg, bg


11. Boot
    ----

dmesg, uname (-a, -r), /etc/issue

init (0, 1, 2, 3, 4, 5, 6)
ntsysv, rcconf

/boot/grub/menu.lst
/etc/inittab


12. Networking
    ----------

ping, traceroute, ifconfig, route, nslookup, dig

/etc/resolv.conf
nameserver 193.40.160.3


13. Development
    -----------

gcc, gdb, cpp, make, strip


14. Install
    -------

yum (install remove search), rpm (-q -a -i -e -v -h -U) rpm -Uvh
zypper (install, remove, search)
apt-get (install, remove, autoremove), apt-search, apt-src, apt-file
dpkg (-i, -r), dpkg-query


15. Varia
    -----

crontab, mail
