2010
02.28
Show files by size, biggest last:
ls -lSr
Show files in size, biggest first
ls -Ssh | head
Show top disk users in current dir.
du -s * | sort -k1,1rn | head
Show free space on mounted filesystems
df -h
Show free inodes on mounted filesystems
df -i
Show disks partitions sizes and types
fdisk -l
List all packages by installed size (Bytes) on rpm distros
rpm -q -a –qf ‘%10{SIZE}\t%{NAME}\n’ | sort -k1,1n
2010
02.27
The most easy way to block advertisements and other malware sites is to point those site to ip address 127.0.0.1 or 0.0.0.0 (zero version is not supported by all systems) in your hosts file.
There are sites which provides the list of the sites names which are responsible to displaying the ads or spreading the malware so, download the list of those sites and put it into your hosts file and restart your system.
For Windows 9x and ME place this file at “C:\Windows\hosts”
For NT, Win2K and XP use “C:\windows\system32\drivers\etc\hosts” or Linux, /etc/hosts”.
This is an easy and effective way to protect you from many types of spy-ware, reduces bandwidth use, blocks certain pop-up traps, prevents user tracking by way of “web bugs” embedded in Spam, provides partial protection to browsers from certain web-based exploits and blocks most advertising you would otherwise be subjected to on the Internet.
One of the advantages from this modification is that your web surfing experience would be significantly faster because your browser does not have to wait for the annoying advertisement to load.
2010
02.24
Use the following command to update the webstatistics of a single domain in plesk.
/usr/local/psa/admin/sbin/statistics –calculate-one –domain-name=domain.com
2010
02.08
Here are some shortcuts that can be used in vim:
h — move left
j — move down
k — move up
l — move right
0 — to the first character in a line
$ — to the end of the line
w – move to first character of the next word
e – move to last character of the current / next word
b – move to the first character of the previous word