Section 4 of the man pages contains descriptions of many of the device files. Of particular interest are character devices with major device number 1 (memory device files), 4 (virtual console and serial port device files) and 14 (Open Sound System device files), and block devices with major number 2 (floppy device files), 3 (Primary IDE device files), 8 (SCSI device files), 11 (SCSI CD-ROM device files) and 22 (Secondary IDE device files).
Examine /boot/config-2.6.12.3 and Kconfigs to see which filesystem types are supported by this version of linux.
Software hangs often arise from file locks or conflicts; "fuser -v file" displays information about processes which have a given file or directory open.
hdparm can be used to interrogate and modify drive settings. In the lab, "hdparm -i /dev/hda" will display information about the DVD drive (the -i option does not currently support SATA drives). The command "hdparm -tT /dev/sda" will run timing tests on the SATA drive; these are an indicator of potential throughput. ANY OTHER USAGE OF HDPARM IS DANGEROUS; if there is something you want to try in the lab, check first with the instructor. If you damage the hard drive using hdparm without having first obtained permission from the instructor, you will be subject to the withdrawal / expulsion policy outlined in the syllabus under the section "Tests and Grades".
The stat command can be used to view the details of a file's inode.
The sync command forces synchronization of the mounted filesystems with the VFS and device cache. Periodically executing the sync command ensures that no data will be lost in the event of a power failure.
The touch command updates a file's modification time to the current time without changing any other attributes of the file (if the file does not yet exist, touch will create an inode for it, but no space will be assigned for its contents). Hence "touch (file)" creates a sort of filesystem time stamp which can be used to flag important events in the life of a filesystem. For instance, if you "touch /root/.installed" immediately after installing your OS, "find / -newer /root/.installed" will find all files and directories modified since installation. Note that the time stamp file in this example has been given a name that begins with a period. This has been done simply to avoid seeing that file every time an ls command is executed (you can see such files with an "ls -a" command).
Remember to unmount the drive before removing it physically from the interface; like floppies, there is no guarantee that the filesystem on the drive is in a consistent state if you remove it while it is still mounted (CD-ROM and zip drives will not eject a disk until it has been unmounted).
©2005, Kenneth R. Koehler. All Rights Reserved. This document may be freely reproduced provided that this copyright notice is included.
Please send comments or suggestions to the author.