MISCELLANEOUS…

Miscellaneous
1) Mount ISO image using loopback device (need to have loopback device support):
# mount -o loop -o rw Centos-5.6-i386.iso /mnt

——————————————————————————————–

2) Strace: strace lets you decipher what’s going on when you have no debugger nor the source code. strace often gives me answers much more quickly than a debugger, especially if the code is unfamiliar.
# strace -o strace.out rm -f /etc/yp.conf

———————————————————————————————

3) Time: The time command is useful for understanding your code’s performance. The most basic output consists of real, user and system time. Intuitively, real time is the amount of time between when the code started and when it exited. User time and system time are the amount of time spent executing application code versus kernel code, respectively.
# time curl http://google.com/somequery.sh

———————————————————————————————-

4) Hard Disk Cloning:

# dd if=/dev/hda of=/dev/hdb bs=455356

Note:
1) dd = disk to disk
2) hda=source disk; hdb=destination disk
3) It is recommended to format destination disk using fdisk utility.

———————————————————————————————–

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *

13 − 9 =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>