Wednesday, May 21, 2008
Linux and Unix commands
Here are some commands that you may find useful while installing or troubleshooting Linux.
General Commands
How to write a boot image from your hard disk to a floppy
dd if=boot.img of=/dev/fd0
How to copy the boot image from your hard disk to a floppy
dd if=/dev/fd0 of=floppy.img
How to search for a file arul.jpg recursively in your Unix account
find ~/ -name "arul.jpg"
How to display all the processes running on the host
ps -af
How to check the current quota and tell how much you have used
quota
How to check disk space in a directory (say /usr)
du -s -H /usr
How to report size (in kBytes) of all enclosed directories (recursive)
du -k
How to report size (in kBytes) of all enclosed directories (non-recursive)
du -ms *
How to list login IDs of users currently logged in to the system
users
How to change the permanent information kept by the system about your logon ID
chfn
Administrator commands
access a windows (only FAT or FAT32) partition (say hda2) under linux
mount -t vfat /dev/hda2 /win
allow root user and other users(where user id=500) to get rw permission for that windows partition
mount -t vfat -o uid=500 /dev/hda2 /win
list all device files corresponding to hda
fdisk -l /dev/hda
track down symbolic links, for example, to see where xterm points to
namei /usr/X11/bin/xterm
print Linux version information
uname -r
measure hard disk speed
hdparm -tT /dev/hda
print hardware summary
more /proc/cpuinfo
check inode usage of all mounted partitions
df -i
monitoring the system for the growth of a file
tail -f /var/log/messages
General Commands
How to write a boot image from your hard disk to a floppy
dd if=boot.img of=/dev/fd0
How to copy the boot image from your hard disk to a floppy
dd if=/dev/fd0 of=floppy.img
How to search for a file arul.jpg recursively in your Unix account
find ~/ -name "arul.jpg"
How to display all the processes running on the host
ps -af
How to check the current quota and tell how much you have used
quota
How to check disk space in a directory (say /usr)
du -s -H /usr
How to report size (in kBytes) of all enclosed directories (recursive)
du -k
How to report size (in kBytes) of all enclosed directories (non-recursive)
du -ms *
How to list login IDs of users currently logged in to the system
users
How to change the permanent information kept by the system about your logon ID
chfn
Administrator commands
access a windows (only FAT or FAT32) partition (say hda2) under linux
mount -t vfat /dev/hda2 /win
allow root user and other users(where user id=500) to get rw permission for that windows partition
mount -t vfat -o uid=500 /dev/hda2 /win
list all device files corresponding to hda
fdisk -l /dev/hda
track down symbolic links, for example, to see where xterm points to
namei /usr/X11/bin/xterm
print Linux version information
uname -r
measure hard disk speed
hdparm -tT /dev/hda
print hardware summary
more /proc/cpuinfo
check inode usage of all mounted partitions
df -i
monitoring the system for the growth of a file
tail -f /var/log/messages
Labels:
Linux and Unix commands
Downloading or using a unauthorized version of the post mention in this blog is illegal, the content is hosted on other websites and is being provided here just for news purpose. DISCLAIMER:-The content provided in the website has been taken fom various sources and has been compiled here only for informational purposes.If any mishappening happens with any indivvidual,the owner will not be held responsible for it in any case.
Enter Your Friends Email Address Bellow
0 comments:
Post a Comment