Archive for August, 2007

220 Part II . Getting Around in Linux (Fedora web server)

Friday, August 31st, 2007

220 Part II . Getting Around in Linux storage media, remember that the system treats fixed and removable devices equally. When a device has been mounted it is available for use until it has been unmounted or removed. /dev/hda8 / ext2 defaults 1 1 /dev/hda5 /boot ext2 defaults 1 2 none /dev/pts devpts mode=0620 0 0 /dev/hdb1 /fun ext2 defaults 1 2 /mnt/cdrom /mnt/cdrom supermount fs=iso9660,dev=/dev/cdrom 0 0 /mnt/cdrom2 /mnt/cdrom2 supermount fs=iso9660,dev=/dev/cdrom2 0 0 /mnt/floppy /mnt/floppy supermount fs=vfat,dev=/dev/fd0 0 0 /dev/hda1 /mnt/win_c vfat user,exec,umask=0 0 0 /dev/hda7 /mnt/win_d vfat user,exec,umask=0 0 0 none /proc proc defaults 0 0 /dev/hda9 swap_upgrade swap defaults 0 0 For example, the line /dev/hda8 / ext2 defaults 1 1indicates that partition 8 of hard drive A is mounted in the root (/) directory. The file system is type ext2, and the default options are used for this device. Some of the options available for use are noauto, which specifies that the device should not be automatically mounted, and user, which specifies that the devices are user mountable. The file 0 0 field is used to determine which devices need to be dumped. A value of 0 here specifies that no dump should be performed. The user option here is very important and careful attention should be given to this option. It specifies that a file system is user mountable. This privilege is useful for devices such as removable media devices, allowing users to mount and unmount devices so that the media can be changed. Because this privilege allows users to mount and unmount devices it should not be granted to key file systems. Checking mounted file systems with /etc/mtab The /etc/mtab file contains a listing of the file systems currently mounted by the system. Below is an example of the /etc/mtab file. As you can see the device name is listed along with the mount point. The fields in this file correspond with the fields used in the /etc/fstabfile. The file system type and access is also displayed here. /dev/hda8 / reiserfs rw 0 0 proc /proc proc rw 0 0 /dev/hda5 /boot ext2 rw 0 0 devpts /dev/pts devpts rw 0 0 /dev/hdb1 /fun ext2 rw,noexec,nosuid,nodev 0 0 0 /mnt/cdrom2 /mnt/cdrom2 supermount fs=iso9660,dev=/dev/cdrom2 0 0 /mnt/floppy /mnt/floppy supermount fs=vfat,dev=/dev/fd0 0 0 /dev/hda1 /mnt/win_c vfat user,exec,umask=0 0 0 /dev/hda7 /mnt/win_d vfat user,exec,umask=0 0 0 none /proc proc defaults 0 0 /dev/hda9 swap_upgrade swap defaults 0 0
We highly recommend you visit web and email hosting services if you need stable and cheap web hosting platform for your web applications.

Web hosting ecommerce - Chapter 5 . Using Partitions and File Systems

Thursday, August 30th, 2007

Chapter 5 . Using Partitions and File Systems 219 Table 5-12 Options Used with umount Option Use -h Displays help information. -v Unmounts the file system verbosely. -n Unmounts without writing to the /etc/mtab file. -r If unmounting fails, attempts to remount in read-only mode. -a Unmounts all file systems listed in the /etc/mtab file. -f Forces unmounting of the file system. -V Displays version information. -V Displays version information. Following is an example of the correct use of the umountcommand. # umount /mnt/cdrom This command will unmount the device currently mounted to /mnt/cdrom so that it can be ejected. There are two files you need to know about when mounting and unmounting files: /etc/fstab and /etc/mtab. Checking available file systems with /etc/fstab The /etc/fstab file contains the file systems mounted when a Linux system starts. This file also contains file systems that are mounted manually. If a file system is listed in this file and the proper rights are set, it can be mounted simply by issuing the mount command and the directory, as in the following: # mount /mnt/floppy An example of the /etc/fstabfile is shown below. As you can see from this file, device names are listed followed by the mount point. Next is the file system type and whether the file system is mounted automatically by the operating system or manually by the user. Umask information is also stored here. The umask information is used to set the default permissions on newly created files and directories. This example shows devices mounted using the supermount option available as an option in some Linux kernels. Supermount is designed to prevent the manual mounting and unmounting currently required when changing removable media such as floppy and CD-ROM disks. When working with the mount commands and
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check mysql web server services.

Web hosting servers - 218 Part II . Getting Around in Linux

Wednesday, August 29th, 2007

218 Part II . Getting Around in Linux Mounting file systems The mount command is used for mounting file systems on Linux. The standard form of the mount command is as follows: mount -t type device mountpoint This command specifies the file system type, the device containing the file system, and the directory where the file system is to be located. A common location for mounting file systems on many distributions is the /mnt directory. This directory can be configured with subdirectories such as /mnt/floppy and /mnt/cdrom. An example of the use of this command is shown in the following with the /dev/hda2 device using the ext2 file System to the mount point of /fun. # mount t ext2 /dev/hda2 /fun Several options can be used with the mountcommand; these are covered in Table 5-11. Table 5-11 Options Used with mount Option Use -h Displays help information. -v Mounts the file system verbosely. -a Mounts all file systems listed in /etc/fstab. -f Fakes the mounting of file systems. -l Adds the ext2 labels to the output displayed. -n Mounts a file system without adding it to the /etc/mtab file. -r Mounts the file system read-only. -w Mounts the file system in write mode. -L Mounts the file system with the specified label. -t FILESYSTEM_TYPE Mounts the device as the specified file system type. -V Displays version information. Unmounting file systems The umount command is used to unmount file systems on Linux systems. This is often used to unmount a removable media device before it is ejected. No open files can exist on the file system when unmounting. File systems can be unmounted using either the device name or the mount directory. Several options can be used with the umountcommand; these are covered in Table 5-12.
Check Tomcat Web Hosting services for best quality webspace to host your web application.

Chapter 5 . Using Partitions and File Systems (Free php web host)

Tuesday, August 28th, 2007

Chapter 5 . Using Partitions and File Systems 217 Option Use -m Displays size in megabytes. -i Displays inode usage information. -l Limits the listing to those in the local file system. -x FILESYSTEM Excludes the specified file system from the listing. Following are some examples of output produced using the df utility. The first example is using the df utility with no options. The second example produces human readable sizes for the file systems listed. The third example displays inode information for all mounted file systems. # df Filesystem 1k-blocks Used Available Use% Mounted on /dev/hda8 4096380 1469176 2627204 36% / /dev/hda5 15522 3710 11011 25% /boot /dev/hdb1 9740592 6861408 2384384 74% /fun # df -h Filesystem Size Used Avail Use% Mounted on /dev/hda8 3.9G 1.4G 2.5G 36% / /dev/hda5 15M 3.6M 11M 25% /boot /dev/hdb1 9.3G 6.5G 2.3G 74% /fun # df -i Filesystem Inodes IUsed IFree IUse% Mounted on /dev/hda8 4294967295 0 4294967295 0% / /dev/hda5 4016 27 3989 1% /boot /dev/hdb1 1237888 9692 1228196 1% /fun Be sure to know the option used to display inode information for the file systems. Mounting and Unmounting File Systems Objective 2.4 Devices, Linux File Systems, Filesystem Hierarchy Standard Control filesystem mounting and unmounting. Mount and unmount filesystems manually, configure filesystem mounting on bootup, configure user-mountable removable filesystems. Includes managing file /etc/. The last step required for using a file system is that it must be mounted. Mounting a file system makes it available to the system and the user. This section covers the utilities used for mounting and unmounting file systems. Also covered here are the files that contain information for file systems on a Linux system. These tools are used on a daily basis when working with Linux systems and are of particular interest when preparing to use a system and when preparing for the exam. Exam Tip
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.

216 Part II . (Hp web site) Getting Around in Linux

Monday, August 27th, 2007

216 Part II . Getting Around in Linux Table 5-9 Options Used with du Option Use -b Displays size in bytes. -c Prints a total for all arguments after they are processed. -h Creates human readable output, appending letters such as M for megabytes. -k Displays size in kilobytes. -m Displays size in megabytes. -s Displays a summary total for each argument. -x Skips directories containing file systems other than the one contained in the argument. -a Shows counts for all files and directories. The following example shows the correct usage of the du utility to report the space used by the /usr directory. # du -sh /usr 1007M /usr df The df utility is used to display disk space used and available on mounted file systems. When no options are used, the df utility reports the space used and available on all currently mounted file systems. A variety of options can be used to control the output produced by the dfutility; these options are shown in Table 5-10. Table 5-10 Options Used with df Option Use -a Shows counts for all file systems. -t FILESYSTEM Limits the listing to those of the specified file system type. -h Creates human readable output, appending letters such as M for megabytes. -k Displays size in kilobytes.
Searching for affordable and reliable webhost to host and run your web applications? Go to our java web server services and you will be pleased.

Chapter 5 . Using Partitions and File Systems (Make a web site)

Sunday, August 26th, 2007

Chapter 5 . Using Partitions and File Systems 215 verbose check of the first partition on the second IDE drive. The drive is marked clean, and the number of used files versus possible files and used blocks versus total blocks is shown. # umount /fun # fsck.ext2 -v /dev/hdb1 e2fsck 1.18, 11-Nov-1999 for EXT2 FS 0.5b, 95/08/09 /dev/hdb1: clean, 9692/1237888 files, 1754206/2474002 blocks In the second example a check is verbosely forced on the same partition. The drive is carefully examined and more detailed information regarding files, links, and blocks is displayed. # fsck.ext2 -v -f /dev/hdb1 e2fsck 1.18, 11-Nov-1999 for EXT2 FS 0.5b, 95/08/09 Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information 9692 inodes used (0%) 157 non-contiguous inodes (1.6%) # of inodes with ind/dind/tind blocks: 1194/205/0 1754206 blocks used (70%) 0 bad blocks 8884 regular files 776 directories 0 character device files 0 block device files 1 fifo 0 links 22 symbolic links (22 fast symbolic links) 0 sockets 9683 files # mount /fun When you re finished checking the drive, you must mount it for it to be available for use by the system. du The du utility is used to report the amount of disk space used by the files and subdirectory for the specified directory. If no directory is specified for the utility, du works with the pwd, or present working directory. The user must have read access to the files and directories in order for this utility to run. The function of the du utility can be controlled using a variety of options, which are covered in Table 5-9.
We recommend high quality webhost to host and run your jsp application: christian web host services.

214 Part II . Getting Around in Linux (Best web hosting)

Saturday, August 25th, 2007

214 Part II . Getting Around in Linux Normally during system boot, fsck -pis run to check all file systems listed in the /etc/fstab file. This will automatically detect and fix problems with inodes, link counts, data blocks, and the superblock. If a more serious error is located, fsck -p will ask for help and then exit. Some of the errors that will cause this are as follows: . Blocks claimed by multiple files . Blocks claimed outside of the file system . Too few link counts . Unaccounted blocks . Directories that correspond to unallocated inodes . Format errors In cases where the parent directory of a file cannot be determined, the file will be placed in /lost+found. Files here are renamed with their inode numbers. Examining the contents of this directory can be useful when missing files after a system error. The exit information presented by the fsckutility provides useful information about the results of the operation. Each code represents a specific exit condition for the utility. The actual code returned is the sum of the exit conditions. The exit codes are displayed on the command line when the command has finished its operation. The exit codes are shown in Table 5-8. Table 5-8 fsck Exit Codes Code Meaning 1 File system errors corrected. 2 System should be rebooted. 4 File system error left uncorrected. 8 Operational error 0 No errors. 16 Usage or syntax errors. 128 Shared library error. The fsck utility should not be run on currently mounted devices. When checking a device it is recommended that you first unmount the device and then run fsck. The following examples show the correct use of the fsck utility. First, the drive is unmounted so that fsck can access the partition. The first example performs a
If you are in need for chaep and reliable webhost to host your website, our recommendation is http web server services.

Chapter 5 . (Shared web hosting) Using Partitions and File Systems

Friday, August 24th, 2007

Chapter 5 . Using Partitions and File Systems 213 Option Use -y Assumes yes to all questions. -c Checks for bad blocks. -f Forces a check even if the file system is marked clean. -r Interactively prompts for changes. -v Be verbose. -b SUPERBLOCK Uses an alternative superblock. -l BADBLOCKS-FILE Adds to bad blocks list. -L BADBLOCKS-FILE Sets bad blocks list. -A Checks all file systems listed in /etc/fstab. -C Displays a completion/progress bar. Currently only works for ext2 file systems. -N Doesn t execute, simply displays what would be done. -P Used with A; processes the root file system in parallel with others. -R Used with A; causes the root file system to be skipped. -V Displays version information. These options are especially useful for specifying bad blocks and the superblock. The ability to specify an alternative superblock allows for the file system to be recovered in the case of a corrupt or damaged superblock. Copies of the superblock are stored throughout the disk, and an alternative superblock can be specified. As mentioned earlier in this chapter, a backup superblock is stored at throughout the file system. During the fsckcheck of a system the following is done: . Pass 1: Checking inodes, blocks, and sizes . Pass 2: Checking directory structure . Pass 3: Checking directory connectivity . Pass 4: Checking reference counts . Pass 5: Checking group summary information
In case you need affordable webhost to host your website, our recommendation is ecommerce web host services.

212 Part II . Getting Around in Linux (Web hosting faq)

Thursday, August 23rd, 2007

212 Part II . Getting Around in Linux Checking the File System Objective 2.4 Devices, Linux File Systems, Filesystem Hierarchy Standard Maintain the integrity of filesystems. Verify the integrity of filesystems, monitor free space and inodes, fix simple filesystem problems. Includes commands fsck, du, df. You only need to create a file system occasionally; most people configure their partitions and create file systems only once. The ongoing process is maintaining the file system. Linux provides several useful tools for verifying, monitoring, and fixing file systems. In this section we examine the tools used for these purposes: fsck, du, and df. fsck The fsck utility is a file system checker utility that is useful for examining file systems to locate and possibly repair problems that are found. When specifying multiple file systems, the checks are run in parallel, unless you use the -soption to specify that they should be processed serialized. The fsck utility is similar to mkfs in that a different utility is used for each file system. Table 5-6 covers the fsckutilities and their use. Table 5-6 fsck Utilities Utility Use e2fsck or fsck.ext2 Linux ext2 file system checker dosfsck or fsck.msdos MS-DOS file system checker fsck.minix Minix file system checker When running these utilities you can use several options to control the actions taken. Table 5-7 shows the options used with the fsckutilities. Table 5-7 Options Used with fsck Option Use -p Automatically repairs without prompting. -n Makes no changes to the file system.
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.

Chapter 5 . Using Partitions and (Java web server) File Systems

Wednesday, August 22nd, 2007

Chapter 5 . Using Partitions and File Systems 211 The options used by mkfs are followed by an argument specifying the partition that is to be formatted. After the command has been run an exit code of 0 (zero) will indicate success while the exit code of 1 (one) indicates failure. An example of the syntax used is as follows: mkfs option argument When creating a file system using mkfs, several commands can be used to specify the file system type. Table 5-5 shows the various commands to use when creating file systems. As you can see, there are specific commands to run for each file system type you want to create. These commands are accessible only by the root user. The utilities to understand for the test, and for real world usage, are covered here. Each file system type is created using a specific command. Be sure to know which commands are used for creating ext2, swap, and MS-DOS file systems. Exam Tip Table 5-5 Utilities for File System Creation Command Use mkfs.ext2 or mke2fs Creates an ext2 file system. mkfs.msdos or mkdosfs Creates an MS-DOS file system. mkswap Creates a Linux swap partition file system. mkraid Initializes and upgrades RAID device arrays. mkfs.minix Creates a Minix file system. mkfs.bfs Creates a SCO BFS file system. Cross- Reference More details on the options available when creating each file system can be located in the Linux man pages. To create a file system the correct tool specified in Table 5-5 must be used. An example of the proper use of these utilities is creating an ext2 partition using mkfs.ext2 as shown below: # mke2fs /dev/hda3
Go visit our java server pages services for a reliable, lowcost webhost to satisfy all your needs.