iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent --set iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent --update --seconds 600 --hitcount 4 -j DROP
(Found here http://blog.blackdown.de/2005/02/18/mitigating-ssh-brute-force-attacks-with-ipt_recent/
cd /tmp tar cvf - blarg | (cd /var; tar xf -)or to copy from a local machine to a remote machine
tar Pcfz - /usr/local/src/aolserver | ssh rumborak.foobar.de tar Pvxfz -or to copy from a remote machine to a local machine
ssh rumborak.foobar.de tar Pcfz - /usr/local/src/aolserver | tar Pvxfz -
rpm -q Blahblah
rpm -qa
rpm -qf /home/dirk/bla.ttx
rpm -qi rpm
rpm -qp1 bla.rpm
rpm2cpio logrotate-1.0-1.i386.rpm | cpio -t
| sed '23!d' filename | Output line 23 of filename |
| sed '23,42!d' filename | Output lines 23 to 42 of filename |
| sed -n '/foo/,/bar/p' filename | Output all lines between the first line that matches foo and the last line that matches bar. |
| sed -n '/foo/,/bar/p' filename | Output all lines that are not in between the lines which contain "foo" and "bar" |
| grep '^..$' filename | Match all lines with exactly two characters |
| grep '^.\{12\}$' filename | Match all lines with exactly 12 characters |
| grep '^.\{12,\}$' filename | Match all lines with at least 12 characters |
| grep '^.\{7,12\}$' filename | Match all lines with at least 7 and less than or equal to 12 characters |
| grep -v foobar filename | Match all lines in filename that do not match foobar |
| find . -name Root -exec perl -pi -e 's/\/usr\/local\/cvsroot/\/cvsweb/' {} \; | |
| find . |
| apt-cache add | |
| apt-cache gencaches | |
| apt-cache showpkg | |
| apt-cache stats | |
| apt-cache unmet | |
| apt-cache search | |
| apt-cache depends | |
| apt-cache policy | |
| apt-cache pkgnames | |
| apt-cache dotty |
| dpkg -l | List packages matching given pattern. If no package-name-pattern is given, list all packages in /var/lib/dpkg/available. |
| dpkg -L | List files installed to your system from package. |
| dpkg -S | Search for a filename from installed packages |
| + | Install or upgrade |
| - | Remove |
| _ | Remove and purge config |
| = | Hold in present state |
| : | Unhold: upgrade or leave uninstalled |
| o | Change order of the list |
| v,V | Toggle verbose display |
| i,I | Toggle/cycle info displays |
| U | set all to sUggested state |
| D | set all to Directly requested state |
| / | search (Return to cancel) |
| \ | repeat last search |