Archive for September, 2007

240 Part II . Getting Around in Linux (Web space)

Monday, September 17th, 2007

240 Part II . Getting Around in Linux Table 6-5 (continued) Option Use -v Displays version information and exits. -z Attempts to examine the contents of compressed files. -n Flushes stdout after checking a file. This can be useful when working with a list of files that are being sent to another command. Some example uses of the file command and its options follow. In the first example, the *wildcard is used, so the command examines all the files in the pwd. # file * alphanames: ASCII text list: ASCII text morestuff: directory nameslist: ASCII text newstuff: directory nicks: ASCII text oldstuff: directory readmes: English text In the following example, the filename isn t included with the output: # file -b /etc/lilo.conf ASCII text In the following example, the file command is used to examine the contents of a compressed file: # file -z /usr/info/tar.info.gz /usr/info/tar.info.gz: English text (gzip compressed data, deflated, last modified: Wed Dec 31 19:00:00 1969, max compression, os: Unix) Changing file time stamp The touch command allows you to change the time stamp on a file. If a filename is specified, but that file doesn t exist, an empty file is created with that name. The options available for use with the touch command are covered in Table 6-6.
In case you need affordable webhost to host your website, our recommendation is ecommerce web host services.

Web hosting india - Chapter 6 . Managing Files 239 The following

Sunday, September 16th, 2007

Chapter 6 . Managing Files 239 The following example lists filenames according to access time, with an appended character / showing the directories. # ls -pu morestuff/ nicks list readmes alphanames nameslist The following example lists the contents of the /home/angie/stuff directory and all its subdirectories. # ls -R /home/angie/stuff alphanames list morestuff nameslist newstuff nicks oldstuff readmes /home/angie/stuff/morestuff: /home/angie/stuff/newstuff: newnameslist newnicks /home/angie/stuff/oldstuff: oldnameslist oldnicks As you can see in these examples, the ls command can be a powerful tool for gathering information about files and directories. This command is often used in conjunction with other commands and files using pipes and redirection. This allows output to be saved to a file or processed by other utilities. Understanding the use of the ls command alone and with other utilities will prepare you for the exam and for the job of working with Linux systems. Determining a file type The ls command provides a high degree of functionality when examining files. However, it provides limited information about the contents of the file. The file command can be used to learn more about the contents of files on a Linux system. The output of the filecommand includes one of the following words: text, executable, data, or directory. This command accepts arguments to specify which files to examine. A variety of options can be used with this command; these are shown in Table 6-5. Table 6-5 Options Used with file Option Use -b Specifies that filenames are not to be included with the output. -f Specifies that the file contains the names of files that are to be examined by the file command. Continued
You want to have a cheap webhost for your apache application, then check apache web hosting services.

238 Part II . Getting Around in Linux (Free web host)

Saturday, September 15th, 2007

238 Part II . Getting Around in Linux Table 6-4 Output Appearance Options Used with ls Option Use -C Output is displayed in columns. -F Displays filenames with an appended character to specify file type. -k Displays file size in kilobytes. -m Displays filenames horizontally separated by commas. -n Displays the user name and group id numbers. -p Displays filenames with an appended character to indicate type. -x Displays filenames in horizontally ordered columns. -T COLS Displays filenames with tab stops set COLS columns wide. -w COLS Displays filenames with screen width set COLS columns wide. -1 Output is displayed one file per line. Exam Tip These options can be combined to create very specific output using the ls command. The following are some examples of how these options can be used to control what data is displayed along with how it is displayed. Refer to the preceding tables to ensure that you understand the reasons each of these commands produces the resulting output. You can be sure that the ls command used with options and arguments will appear on the exam. Be sure you understand how to use these elements together to produce a variety of output. The following example lists all contents of the directory with details, one file per line: # ls -al drwx——3 angie angie 4096 Dec 10 23:11 .. -rw——-1 angie angie 11087 Dec 10 23:16 .bash_history -rw-r–r–1 angie angie 24 Dec 10 23:16 .bash_logout -rw-r–r–1 angie angie 230 Dec 10 23:16 .bash_profile -rw-r–r–1 angie angie 124 Dec 10 23:16 .bashrc -rwxr-xr-x 1 angie angie 333 Dec 10 23:16 .emacs -rw——-1 angie angie 12288 Dec 10 23:16 .namelist.swp -rw-rw-r–1 angie angie 62 Dec 10 23:16 .plan -rw-r–r–1 angie angie 3394 Dec 10 23:16 .screenrc -rw-rw-r–1 angie angie 320 Dec 10 23:17 alphanames -rw-rw-r–1 angie angie 87 Dec 10 23:18 list -rw-rw-r–1 angie angie 203 Dec 10 23:17 nameslist -rw-rw-r–1 angie angie 117 Dec 10 23:18 nicks -rw-rw-r–1 angie angie 2288432 Dec 10 23:18 readmes
From our experience, we can recommend PHP Web Hosting services, if you need affordable webhost to host and run your web application.

Chapter 6 . Managing Files (Hosting web) 237 A variety

Friday, September 14th, 2007

Chapter 6 . Managing Files 237 A variety of options can be used to specify the information displayed with the file listings. Table 6-2 covers the information listing options used with the ls command. Table 6-2 Information Listing Options Used with ls Option Use -i Displays the inode number. -l Displays file type, permissions, hard link count, file owner, group owner, and modification time. -o Displays the same information as the -l option except group information is excluded. -s Displays the file size in 1024-byte blocks. -G Specifies that group information is not to be displayed. The ls command also uses options to order the output that is displayed. These options are shown in Table 6-3. Table 6-3 Output Ordering Options Used with ls Option Use -f Displays output in the order which they were saved in the directory. -r Displays output in reverse order. -S Displays files according to size from largest to smallest. -t Displays files by modification time beginning with most recent. -u Displays files by access time beginning with most recent. -c Displays output according to the status change time or ctime of the inode. The output produced with the lscommand can also be controlled with another set of options. The options shown in Table 6-4 control the appearance of the output produced.
In case you need affordable webhost to host your website, our recommendation is ecommerce web host services.

Com web hosting - 236 Part II . Getting Around in Linux

Friday, September 14th, 2007

236 Part II . Getting Around in Linux The ls command can accept paths as arguments and will provide a listing of the files and directories located within the path. You can use absolute paths, like this: # ls /home/angie/stuff alphanames list nameslist nicks readmes Alternatively, you can use a relative path, like this: # ls stuff alphanames list nameslist nicks readmes The argument can also contain strings and wildcards, in which case a listing of all files and directories matching the string are displayed, like this: # ls a* abc123names abcnames alphanames alteredservices When paths are used in conjunction with wildcards, the path is shown along with the results: # ls /home/angie/stuff/n* /home/angie/stuff/nameslist /home/angie/stuff/nicks # ls stuff/n* stuff/nameslist stuff/nicks The ls command can accept options along with arguments. A large number of options are available for this command to allow for a large degree of control on the output produced. In the tables that follow we have arranged the options according to use for ease of reference. Table 6-1 contains the options used to configure the file listings displayed with the lscommand. Table 6-1 File Listing Options Used with ls Option Use -A Works like -a except . and .. are not listed. -B Files ending with ~ are not displayed. -d Displays the directory name instead of the contents. -L Displays file information for the file referenced in a link instead of information for the link. -R Displays contents of the directories recursively so that the contents of child directories are also displayed. -a Lists all contents of the directory, including those beginning with a period.
Visit our web design programs services for an affordable and reliable webhost to suit all your needs.

Chapter 6 (Web design software) . Managing Files 235 character used

Thursday, September 13th, 2007

Chapter 6 . Managing Files 235 character used at the shell prompt is the wildcard character (*). This character is used to present either no or multiple characters. The following command will display all files and directories beginning with the letter a, including any that are simply named a. # ls a* The following example uses shell symbols to move up one directory within the directory structure. # cd .. Caution Notice the space between the cd command and the periods. This space is required on Linux systems unless an alias has been created so that cd.. is translated as cd .. Following is an example of using an environment variable with the cdcommand. This will change the working directory to the directory specified in the HOMEenvironment variable. The $ symbol is used to specify an environment variable at the command line. cd $HOME No options are used with the cd command. It simply uses the argument given as the path that is to become the pwd. This simple command may well be the most frequently used of all commands on Linux systems. Listing directory contents Another commonly used command is the lscommand, which is used to list the contents of a directory; ls is short for list. When the command is used without arguments or options, it simply lists all of the files and directories located within the pwd that aren t marked as hidden files. By default, the output is displayed in alphabetical order. For example: # ls abcnames list1 mycommands numberednames alphanames list2 mydoc readmes alphanicks list_1 myfile.12.11.00 sortednameslist alteredservices list_2 myfiles status auto longerfile.gz mynewcommands stuff doomnicks longerfile2.gz names test fivenamesaa longerfile3.gz nameslist test2 fivenamesab longerfile~.gz nameslisterrors xaa fivenamesac marital new xab infodoc mergedalpha newtest xac
Check Tomcat Web Hosting services for best quality webspace to host your web application.

234 Part II . Getting Around in Linux (Web hosting servers)

Wednesday, September 12th, 2007

234 Part II . Getting Around in Linux /proc /usr /home /user1 /user2 /user3 /opt /boot /etc /tmp /var /root /lib /dev /bin /sbin / Figure 6-1: Basic Linux directory structure The cd command is used to move through the directories at a Linux shell prompt; cd stands for change directory. This is one of the simplest commands used on a Linux system. The present working directory, or pwd, is the directory that you are in at any moment. When used alone, the cd command will change the user s working directory to their home directory. It is also possible to specify the directory you wish to make your working directory. The following is the syntax for the cd command. cd /directory The cd command can be used with a leading slash when specifying the absolute directory path starting at the root directory. This allows you to move to any location within the file system by specifying its absolute path. Without the leading slash, the system searches for the directory you specified within the pwd. Finding a directory within the pwdis known as a relative path. An example of using relative paths is shown in the following example. In this example the pwdcommand is used to view the present working directory. # pwd /home # cd angie # pwd /home/angie The cd command can also be used with shell symbols and environment variables. The . and .. directories are hidden files that exist in every directory. The . represents the current directory while the .. represents the parent directory. For the / directory the .. file points to the /directory. Another shell symbol commonly used is the ~ character. This character is used to represent the user s home directory. Finally, the character can be used with the cdcommand to return to the previous directory. These are all special characters used as shell symbols. Another special
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 6 . Managing Files 233 This chapter (Web hosting bandwidth)

Tuesday, September 11th, 2007

Chapter 6 . Managing Files 233 This chapter covers many of the various tools used for managing files. Basic commands used for creating, moving, and deleting files are covered. Also covered in this chapter are commands used for dealing with directories that contain files. A variety of tools used for locating and compressing files are explained in this chapter. You will also learn about the tools used for managing quotas and permissions, two areas where users and files are closely connected. Finally, you will learn how file links are used and where the standard location of many of the files on a Linux system is. File management is a major part of working with a Linux system, so thoroughly understanding the material covered in this chapter is important. Managing Files Objective 1.3 GNU and Unix Commands Perform Basic File Management. Use the basic unix commands to copy and move files and directories. Perform advanced file management operations such as copying multiple files recursively and moving files that meet a wildcard pattern. Use simple and advanced wildcard specifications to refer to files. When working with a Linux system, you need to be familiar with basic commands used for file management. In this section we cover the most commonly used tasks, including moving around the file system and working with directories and files. Exam Tip You will need to know the purpose of each command along with the commonly used options and functionality. When working with files on a Linux system, you should keep in mind a few practices and restrictions. Hidden files begin with a period. Filenames can begin with a number, but they can t contain slashes, question marks, asterisks, or other reserved characters. File extensions aren t always required but can be useful for keeping track of file types. The following sections examine some of the basic commands used when dealing with files and directories. Changing directories Directories on a Linux system are arranged in a tree structure. The / directory, known as the root directory, contains a number of system directories. Each of these directories can contain further directories and so on as the tree branches outward. Figure 6-1 shows this directory structure. The system directories and their locations are covered later in this chapter.
Check Tomcat Web Hosting services for best quality webspace to host your web application.

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

Monday, September 10th, 2007

232 Part II . Getting Around in Linux EXAM OBJECTIVES (CONTINUED) Find system files and place files in the correct location. Understand the filesystem hierarchy standard, know standard file locations, know the purpose of various system directories, find commands and files. Involves using the commands: find, locate, which, updatedb. Involves editing the file: /etc/updatedb.conf CHAPTER PRE-TEST 1. Which command is used to search for files using a database? 2. Where is the system kernel located? 3. What tool is used to set default permissions? 4. Which type of file link can span file systems? 5. Quotas are enabled using which command? 6. Which command is used to list files in a directory? 7. Which command is used to create a directory? 8. What command can be used to create an empty file? 9. What command is used to search the PATH statement for a command? 10. Which command recursively searches the directory for a specified filename? . Answers to these questions can be found at the end of the chapter. .
From our experience, we can recommend PHP Web Hosting services, if you need affordable webhost to host and run your web application.

6 CHAPTER Managing Files …. EXAM OBJECTIVES Exam (Disney web site)

Sunday, September 9th, 2007

6 CHAPTER Managing Files …. EXAM OBJECTIVES Exam 101 . General Linux, Part 1 1.3 GNU and Unix Commands Perform Basic File Management. Use the basic unix commands to copy and move files and directories. Perform advanced file management operations such as copying multiple files recursively and moving files that meet a wildcard pattern. Use simple and advanced wildcard specifications to refer to files. 2.4 Devices, Linux File Systems, Filesystem Hierarchy Standard Set and view disk quota. Setup disk quota for a filesystem, edit user quota, check user quota, generate reports of user quota. Includes quota, edquota, repquota, quotaon commands. Use file permissions to control access to files. Set permissions on files, directories, and special files, use special permission modes such as suid and sticky bit, use the group field to grant file access to workgroups, change default file creation mode. Includes chmod and umask commands. Requires understanding symbolic and numeric permissions. Manage file ownership. Change the owner or group for a file, control what group is assigned to new files created in a directory. Includes chown and chgrp commands. Create and change hard and symbolic links. Create hard and symbolic links, identify the hard links to a file, copy files by following or not following symbolic links, use hard and symbolic links for efficient system administration.
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.