Mini-Howtos
I get the feeling that my hard disk is very slow. Is there a way I can verify and tune it?You can use hdparm to tune your hard disk. On Debian, you would run apt-get install hdparm to install it. hdparm --help shows a list of all available options. To get more information about your hard disk, run hdparm -i /dev/hda This will look like: /dev/hda:
Model=MAXTOR 6L060J3, FwRev=A93.0500, SerialNo=663214759549
Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
RawCHS=16383/16/63, TrkSize=32256, SectSize=21298, ECCbytes=4
BuffType=DualPortCache, BuffSize=1819kB, MaxMultSect=16, MultSect=16
CurCHS=4047/16/255, CurSects=16511760, LBA=yes, LBAsects=117266688
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 *udma2
AdvancedPM=no WriteCache=enabled
Drive conforms to: ATA/ATAPI-5 T13 1321D revision 1:
* signifies the current active mode
To see how fast your hard disk currently is execute How can I observe a logfile continuously?With the command: tail -f /path/to/logfile you will see all lines added to the logfile. To stop this, press [CTRL] + cHow to save a command in the shell history without executing itEnter the command line and hit the keys: [CTRL] + [#] This will put a # in front of the command and execute it. The shell will take it as comment. How can I clear the shell window?Use the commad: clear or the keyboard shortcut: [CTRL] + [L] Creating image borders with ImageMagick convertThe command is: convert -border 2x2 old.jpg new.jpg This creates a new image (new.jpg) with a 2 pixel border from the image old.jpg. To set the bordercolor to red, use this command: convert -border 2x2 -bordercolor "#FF0000" old.jpg new.jpg Get a list of the installed servicesTo get a list of the installed services on the shell, you may use this command (on Fedora, RedHat, CentOS, SuSE, and Mandriva): chkconfig --list Show all processes for a specific userTo view only the processes owned by a specific user, use the following command: top -U [USERNAME] and replace [USERNAME] with the name of the user. Making snapshots of the process table shown by the TOP commandTo make a snapshot of the current process table, use the following command: top -n 1 -b > /tmp/processtable.txt You can now view the textfile with any text editor, e.g. pico or vi. How do I search for a term in a file?With the grep command. If you want to find out if the term user is in /etc/httpd/conf/httpd.conf, you would run grep -i user /etc/httpd/conf/httpd.conf (-i makes the search case-insensitive). Normally grep does not tell you the line number where it finds the term. If you want to find out the line number, run grep -n -i user /etc/httpd/conf/httpd.conf How do I find out who is logged in on my system?You can find out about logged in users either by running who (Sample output: server:~# who root pts/0 Nov 12 11:28 (192.168.0.202) ) or w which gives more detailed output: server:~# w 11:29:49 up 2:19, 1 user, load average: 0.02, 0.01, 0.00 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT root pts/0 192.168.0.202 11:28 0.00s 0.08s 0.01s w |


Recent comments
18 hours 8 min ago
18 hours 13 min ago
23 hours 11 min ago
1 day 5 hours ago
1 day 6 hours ago
1 day 7 hours ago
1 day 12 hours ago
1 day 18 hours ago
1 day 22 hours ago
2 days 23 min ago