Outline ·
[ Standard ] ·
Linear+
[HOWTO], FAQ, Guides
kons
|
Jun 20 2007, 09:16 AM
|
Конс
|
Delete really lots of filesSometimes rm command can't handle too many files. Another neat way to do it is to try this:- CODE find . -name "*" -print | xargs rm Replace * with the file names to matchIt can be further tweaked to do recursive delete. Added on June 25, 2007, 11:52 pmClear history of all typed commandCODE history -c This post has been edited by kons: Jun 25 2007, 11:52 PM
|
|
|
|
kons
|
Jan 29 2008, 01:49 PM
|
Конс
|
Linux clock runs too fast on VPChttp://support.microsoft.com/kb/918461Set clock=pit to the kernel boot line in grub.conf Added on February 18, 2008, 6:28 pmGenerate Artificial Load in Linux.touch test; i=10; while ((i--)); do while [ -e test ]; do echo $RANDOM > /dev/null; done & done i=x, where x is the load. i=10 would generate load avg of 10 i=20 would generate load avg of 20 To stop, just rm -f test. This post has been edited by kons: Oct 23 2008, 09:28 AM
|
|
|
|
kons
|
Oct 23 2008, 09:28 AM
|
Конс
|
Simulate DHCP request without changing the physical IP on the eth (Testing DHCP service only)CODE dhclient -1 -s 192.168.48.2 -cf /dev/null -pf /tmp/test.pid -sf /tmp/s eth1 -1 = do it one time -s = dhcp server -cf = config file -pf = pid file -sf = script file eth1 = interface If failed, returns exit code 2
|
|
|
|
kons
|
Oct 24 2008, 04:35 PM
|
Конс
|
Checking number of connection entriesOne way to limit p2p is to install ip_conntrack modules and iptables connlimit modules. connlimit module can block the number of connections that the end-user can get at one time, if you set it to 100, that means the end-users can only connect to 100 host at a time, which is fine for web surfing but for p2p, it is too restrictive. connlimit will limit those ip_conntrack entries in ESTABLISHED state only. To check the number of connections that an end-user has: CODE cat /proc/net/ip_conntrack|grep ESTABLISHED|cut -d '=' -f2|sort|uniq -c|sort -nr|head -n 20
|
|
|
|