Linux tips

let's list all the processes on the box not being run by you!

ps aux | grep -v `whoami`

Or, to be a little more clever, why not just list the top ten time-wasters:

ps aux --sort=-%cpu | grep -m 11 -v `whoami`

It is probably best to run this as root, as this will filter out most of the vital background processes. Now that you have the information, you could just kill their processes, but much more dastardly is to run xeyes on their desktop. Repeatedly!

Backup your website easily
rsync -vare ssh jono@192.168.0.2:/home/jono/importantfiles/* /home/jono/backup/
Unmount busy drives
lsof +D /mnt/windows
#umount -l /media/whatever
(It's called lazy unmount. see man page for more.)

Stop replying to pings
sysctl -w net.ipv4.icmp_echo_ignore_all=1
To turn it back on, again use:
sysctl -w net.ipv4.icmp_echo_ignore_all=0
Slow down ping rates
sysctl -w net.ipv4.icmp_echoreply_rate=10

An arguably better way to do it would be:

# Save the list
aptitude search -F '%100p' '~i!~M' > pkgs.txt

# Install from list
xargs aptitude --schedule-only install < pkgs.txt
aptitude install

http://www.tuxradar.com/content/linux-tips-every-geek-should-know

Nhận xét

Bài đăng phổ biến từ blog này

Ký tự viết tắt trong chat & email

dung lượng RAM lớn nhất mà HĐH cấu trúc 32-bit nhận được

Ubuntu LAMP Server