Some of the tips in this section are specific to Linux systems. Most are applicable to UNIX system in general.
The du utility command:
You can use the du utility to estimate file space usage. For example, to determine in megabyte the sizes of the /var/log/ and /home/ directory
trees, type the following command:
Keep in mind that the above command will report the actual size of your data. Now that you know for example that /home is using 350M you can move into it and du -sh * to
locate where the largest files are.
traceroute to www.portal.redhat.com (188.8.131.52), 30 hops max, 38 byte packets
1 ppp005.108-253-207.mtl.mt.videotron.net (184.108.40.206) 98.584 ms 1519.806 ms 109.911 ms
2 fa5-1-0.rb02-piex.videotron.net (220.127.116.11) 149.888 ms 89.830 ms 109.914 ms
3 ia-tlpt-bb01-fec1.videotron.net (18.104.22.168) 149.896 ms 99.873 ms 139.930 ms
4 ia-cduc-bb02-ge2-0.videotron.net (22.214.171.124) 99.897 ms 169.863 ms 329.926 ms
5 if-4-1.core1.Montreal.Teleglobe.net (126.96.36.199) 409.895 ms 1469.882 ms 109.902 ms
6 if-1-1.core1.NewYork.Teleglobe.net (188.8.131.52) 189.920 ms 139.852 ms 109.939 ms
7 184.108.40.206 (220.127.116.11) 99.902 ms 99.724 ms 119.914 ms
8 pos1-0-2488M.wr2.CLE1.gblx.net (18.104.22.168) 189.899 ms 129.873 ms 129.934 ms
9 pos8-0-2488m.wr2.kcy1.globalcenter.net (22.214.171.124) 169.890 ms 179.884 ms 169.933 ms
10 126.96.36.199 (188.8.131.52) 199.890 ms 179.771 ms 169.928 ms
11 pos8-0-2488M.wr2.SFO1.gblx.net (184.108.40.206) 159.909 ms 199.959 ms 179.837 ms
12 pos1-0-2488M.cr1.SNV2.gblx.net (220.127.116.11) 179.885 ms 309.855 ms 299.937 ms
13 pos0-0-0-155M.hr2.SNV2.gblx.net (18.104.22.168) 329.905 ms 179.843 ms 169.936 ms
14 22.214.171.124 (126.96.36.199) 2229.906 ms 199.752 ms 309.927 ms
Where <www.redhat.com> is the name or ip address of the host that you want to trace.
Display Web pages access:
To display quickly the number of times your web page has been accessed use this command:
lsof installed on your server?:
If not, install it and execute lsof-i. This should list which ports you have open on your machine. The lsof program is a great tool as it will tell you which processes are
listening on a given port.
commands on remote servers via ssh protocol:
The ssh command can also be used to run commands on remote systems without logging in. The output of the command is displayed, and control returns to the local system. Here is an example which will display all
the users logged in on the remote system.
[email protected]'s password:
root tty1 Dec 2 14:45
admin tty2 Dec 2 14:45
wahib pts/0 Dec 2 11:38
Tab filename completion allows you to type in portions of a filename or program, and then press TAB, and it will complete the filename for you. If there's more than one file or program that starts with what you already
typed in, it will beep, and then when you press TAB again it will list all the files that start with what you initially typed.
You can quickly accomplish tasks that you perform frequently by using shortcut keys one or more keys you press on the keyboard to complete a task. For example, special characters can be used on the Linux shell like the following:
Control+d: If you are in the shell and hit Control+d you get logged off.
Control+l: If you are in the shell and hit Control+l you clear the screen.
?: This is a wildcard. This can represent a single character. If you specified something at the command line like "m?b" Linux would look for mob, mib, mub, and every other letter/number between a-z, 0-9.
*: This can represent any number of characters. If you specified a "mi*" it would use "mit", mim, miiii, miya, and ANYTHING that starts with mi. "m*l" could by mill, mull, ml, and anything that starts with an m and ends with an l.
 - Specifies a range. if I did m[o,u,i]m Linux would think: mim, mum, mom if I did: m[a-d]m Linux would think: mam, mbm, mcm, mdm. Get the idea? The , ?,
and * are usually used with copying, deleting, and directory listings.
: Everything in Linux is CASE sensitive. This means "Bill" and "bill" are not the same thing. This allows for many files to be able to be stored, since "Bill" "bill" "bIll" "biLl", etc. can be
different files. So, when using the  stuff, you have to specify capital letters if any files you are dealing with have capital letters. Much of everything is lower case in UNIX, though.