### Unix commands ### (c) 2002 Tero Karvinen iki.fi/karvinen # ls ; ls -l ; ls -d ; cd directory ; cd .. #up ; cd - #back cp original copyof ; cp -r originaldir copyofdir ; ln -s original linkto mv oldpath/file newpath ; mv oldname newname pico text.txt ; nano text.txt ; luit nano text.txt ; vi text.txt # i :wq chmod og-wr+x $HOME $HOME/public_html ; chmod og-wx+r $HOME/public_html/* man man ; man -k ogg ; ls --help ; ls /usr/share/doc/ locate -i readme ; find -iname \*readme\* ; find -cmin -10 ; grep -ir "auto" * top; ps waux; killall mozilla; killall -9 mozilla; ctrl-z; bg; fg; crtl-c links iki.fi/karvinen/linux ; lynx redhat.com/docs/manuals ; lynx linuxdoc.org ssh user@host.org ; scp -r localdirectory user@host.org:public_html/ wget http://example.com/file ; httrack www.example.com ping 216.239.33.101 ; ping www.google.com ; ifconfig netconfig --ip=194.142.138.91 --nameserver 194.142.138.100 --netmask 255.255.255.128 /etc/init.d/network restart ; hostname me.example.com export http_proxy="http://www-cache.helia.fi:8000" # /etc/profile rpm --install apt-*.i386.rpm ; rpm --query apt ; rpm --erase foobar pico /etc/sources.list ; apt-get update apt-cache search links ; apt-cache show elinks ; apt-get install elinks apt-get upgrade # upgrades everything ; apt-get remove up2date mkdir $HOME/public_html/apt/redhat/8.0/en/i386/RPMS.extra # SRPMS.extra... genbasedir --flat $HOME/public_html/apt/ os updates extra tar --gzip -xvf program.tar.gz ; tar --bzip -xvf program.tar.bz2 ./configure && make && make install # compile from source mount /mnt/cdrom ; umount /mnt/floppy ; mount ; df -h ; mount -a #/etc/fstab mkisofs -r -J -o my.iso dir_to_burn ; cdrecord -v -speed=8 -dev=0,0,0 my.iso md5sum my.iso ; cat /dev/cdrom|md5sum>mycd.md5 ; md5sum mplayer -aspect 4:3 -dvd 1 -alang en -slang fi -stop_xscreensaver -fs /var/log/messages /etc /etc/profile /etc/fstab /home/username /var/www/html /etc/init.d/httpd restart ; /sbin/shutdown -h 1 iptables -P INPUT DROP ; iptables -P FORWARD DROP ; iptables --flush iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -L ; iptables-save > /etc/iptables mogrify -format jpg * linux single ; linux ks=http://mysite.org/ks.cfg ftp://ftp.funet.fi/pub/mirrors/ftp.redhat.com/pub/redhat/redhat-8.0-en/os/i386/ du -mcs *|sort -nr|head -20 ; df -h # what takes space? # Use open formats jpg, png, ogg, txt, xhtml, (unencrypted) pdf