How to test the speed of your ATA hard disk
Answer:
With the help of hdparm command:
# hdparm -tT /dev/hda
/dev/hda:
Timing cached reads: 1352 MB in 2.00 seconds = 676.23 MB/sec
Timing buffered disk reads:86 MB in 3.01 seconds = 28.67 MB/sec
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
How to test the speed of your ATA hard disk
Answer:
With the help of hdparm command:
# hdparm -tT /dev/hda
/dev/hda:
Timing cached reads: 1352 MB in 2.00 seconds = 676.23 MB/sec
Timing buffered disk reads:86 MB in 3.01 seconds = 28.67 MB/sec
How to simulate login as root using sudo command
Answer:
While this is a bad idea, but can be quite handy as you don't need to type sudo all the times
# sudo -i
[sudo] password for john:
root@/:~
Difference between more and less command
Answer:
Both the less and more help you to display the contents of a given file one screen at a time.
The differences:
If you are using modern Linux, you can always use less to replace more.
Remove comments (#) and empty lines in a file
Answer:
To quickly remove comments (#) and empty lines in a file, with the help of egrep
# egrep -v '^[ \t]*#|^$' text.txt
How to save the output from top command
Answer:
Use the following tricks to save the output of top command into a file.
# top -n1 > output.txt