Archive for June, 2007

Managing Files and (Jetty web server) DirectoriesAs mentioned earlier,using a Linux

Saturday, June 30th, 2007

Managing Files and DirectoriesAs mentioned earlier,using a Linux system involves navigating several directories and manip- ulating the files inside them.Thus,an efficient Linux user must understand how to create direc- tories as needed,copy or move files from one directory to another,and delete files anddirectories.These tasks are commonly referred to as file management tasks. Following is an example of a directory listing while the user is logged in as the root user: [root@server1 root]# pwd/root[root@server1 root]# ls -Fcurrent@ myprogram* project project12 project2 project4Desktop/ myscript project1 project13 project3 project5 [root@server1 root]#_ As shown in the preceding output,only one directory (Desktop),two executable files (mypro- gram and myscript),and several project-related files (project*) exist.Although this directorystructure is not cluttered and appears in an easy-to-read format on the terminal screen,typicalhome directories on a Linux system contain many more files;a typical Linux user might haveover 100 files in his home directory.As a result,it is good practice to organize these files intosubdirectories based on file purpose.Because several project files are in the root user s homedirectory in the preceding output,you could create a subdirectory called proj_files to containthe project-related files and decrease the size of the directory listing.To do this,you use themkdir (make directory) command,which takes arguments specifying the absolute or relativepathnames of the directories to create.To create a proj_files directory underneath the currentdirectory,you can use the mkdircommand with a relative pathname: [root@server1 root]# mkdir proj_files[root@server1 root]# ls -Fcurrent@ myprogram* project project12 project2 project4 proj_files/ Desktop/ myscript* project1 project13 project3 project5[root@server1 root]#_ Now,you can move the project files into the proj_files subdirectory by using the mv (move) command.The mvcommand requires two arguments at minimum:the source file/directoryand the target file/directory.If several files are to be moved,simply specify several source argu- ments;the last argument then becomes the target directory.Both the source(s) and destinationcan be absolute or relative pathnames,and the source can contain wildcards if several files areto be moved.For example,to move all of the project files to the proj_files directory,you couldtype mvwith the source argument project*(to match all files starting with the letters pro- ject ) and the target argument proj_files(relative pathname to the destination directory),asshown in the following output: [root@server1 root]# mv project* proj_files[root@server1 root]# ls -Fcurrent@ Desktop/ myprogram* myscript* proj_files/ [root@server1 root]# ls -F proj_files162Chapter 5LINUX FILESYSTEM MANAGEMENT
Note: If you are looking for high quality webhost to host and run your jsp application check Vision florida web design services

Table 5-1 Linux directories defined by (Hp web site) the Filesystem

Saturday, June 30th, 2007

Table 5-1 Linux directories defined by the Filesystem Hierarchy StandardDirectoryDescription /binContains binary commands for use by all users/bootContains the Linux kernel and files used by the boot loader/devContains device files/etcContains system-specific configuration files/homeIs the default location for user home directories/libContains shared program libraries (used by the commands in /bin and /sbin) as wellas kernel modules/mntIs the empty directory used for accessing (mounting) disks,such as floppy disks andCD-ROMs/optStores additional software programs/procContains process and kernel information/rootIs the root user s home directory/sbinContains system binary commands (used for administration) /tmpHolds temporary files created by programs/usrContains most system commands and utilities contains the following directories: /usr/bin User binary commands/usr/games Educational programs and games/usr/include C program header files/usr/lib Libraries/usr/local Local programs/usr/sbin System binary commands/usr/share Files that are architecture independent/usr/src Source code/usr/X11R6 The X Window system/usr/localIs the location for most additional programs/varContains log files and spoolsChapter5161THE FILESYSTEM HIERARCHY STANDARD
Note: If you are looking for high quality webhost to host and run your jsp application check Vision christian web host services

In the previous chapter,you learned about navigating the (Web design careers)

Saturday, June 30th, 2007

In the previous chapter,you learned about navigating the Linux filesystem,as well as viewingand editing files.This chapter focuses on the organization of files on the Linux filesystem,aswell as their linking and security.First,you explore standard Linux directories using the Filesys- tem Hierarchy Standard.Next,you explore common commands used to manage files and direc- tories,followed by a discussion on finding files and directories.Finally,you learn aboutdescribing file and directory linking and common and special permissions available for files anddirectories. The Filesystem Hierarchy StandardMany thousands of files are on a typical Linux system,which are logically organized intodirectories in the Linux directory tree.This complexity also allows different Linux distributionsto place files in different locations.As a result,a great deal of time can be spent searching fora common configuration file on a foreign Linux system.To solve this problem,the FilesystemHierarchy Standard (FHS)was created. FHS defines a standard set of directories for use by all Linux and UNIX systems,as well as thefile and subdirectory contents of each directory.This ensures that,because the filename andlocation follow a standard convention,a Red Hat Linux user will find the correct configura- tion file on a SuSE Linux or Hewlett-Packard UNIX computer with little difficulty.The FHSalso gives Linux software developers the ability to locate files on a Linux system regardless ofthe distribution,allowing them to create software that is not distribution-specific. A comprehensive understanding of the standard types of directories found on Linux systemsis valuable when locating and managing files and directories;some standard UNIX and Linuxdirectories defined by FHS and their descriptions are found in Table 5-1.These directories arediscussed throughout this chapter and the following chapters. To read the complete Filesystem Hierarchy Standard definition, visit the Internet athttp://www.pathname.com/fhs/. NOTE
Note: If you are looking for cheap webhost to host and run your apache application check Vision jboss web hosting services

Linux FilesystemManagementChapter 5After completing this chapter,you will be (Web hosting)

Saturday, June 30th, 2007

Linux FilesystemManagementChapter 5After completing this chapter,you will be able to: .Explain the function of the Filesystem Hierarchy Standard .Use standard Linux commands to manage files and directories .Find files and directories on the filesystem .Understand and create linked files .Modify file and directory ownership .Define and change Linux file and directory permissions .Identify the default permissions created on files and directories .Apply special file and directory permissions
Note: If you are looking for high quality webhost to host and run your jsp application check Vision jsp web hosting services

11.The _________________________ feature of the BASH shell allows (Web hosting unlimited bandwidth)

Friday, June 29th, 2007

11.The _________________________ feature of the BASH shell allows you to enter thebeginning characters of a directory name,and press the tab key to allow the shell tocomplete the name. 12._________________________ files have an association with one another;they canrepresent the same data or they can point to another file. 13.The _________________________ command can be used to provide a long listingfor each file in a certain directory. 14.The _________________________ command displays the first 10 lines (includingblank lines) of a text file to the terminal screen,but can also take a numeric optionspecifying a different number of lines to display. 15.The most common text tool that allows you the ability to search for information usingregular expressions is the _________________________ command. 158Chapter 4EXPLORING LINUX FILESYSTEMS
Note: In case you are looking for affordable webhost to host and run your servlet application check Vision ecommerce web hosting services

Free web host - 2.Which file name extension is used for compiled

Friday, June 29th, 2007

2.Which file name extension is used for compiled object files? a..ob..soc..Zd..sh3.Which flag to the ls command is used to list all files? a.-ab.-Ac.-Fd. r4.Which vi command changes to insert mode and places the cursor before the currentcharacter for entering text? a.ab.Ac.id.I5.Which Emacs command displays documentation? a.Ctrl+ab.Ctrl+dc.Ctrl+ed.Ctrl+h6.True or false? Most files on a Linux system that contain configuration information aretext files. 7.True or false? To view the contents of binary files,you typically use the program thatwas used to create the file. 8.True or false? Wildcard metacharacters are interpreted by a text tool program,whereasregular expressions are interpreted by the shell. 9.True or false? Although the vi editor is very easy to use,it is not portable. 10.True or false? The mcedit editor (Midnight Commander Editor) is an easy-to-usetext editor that contains support for regular expressions and the ability to use themouse for highlighting text. Chapter4157REVIEW QUESTIONS
Note: If you are looking for high quality webhost to host and run your jsp application check Vision christian web host services

Web site developers - od command A Linux command used to display

Friday, June 29th, 2007

od command A Linux command used to display the contents of a file in octal format. pwd (print working directory) command A Linux command used to display the currentdirectory in the directory tree. regular expressions (regexp) The special metacharacters used to match patterns of textwithin text files;they are commonly used by many text tool commands such as grep. relative pathname The pathname of a target directory relative to your current directory inthe tree. socket file A named pipe connecting processes on two different computers;it can also berepresented by a file on the filesystem. special device file A file used to identify hardware devices such as hard disks and serial ports. strings command A Linux command used to search for and display text characters in abinary file. subdirectory A directory that resides within another directory in the directory tree. Tab-completion feature A feature of the BASH shell that fills in the remaining charactersof a unique filename or directory name when the user presses the Tab key. tac command A Linux command that displays a file to the screen beginning with the lastline of the file and ending with the first line of the file. tail command A Linux command used to display the last set number of lines of text in afile;by default,the tailcommand displays the last 10 lines of the file. text file A file that stores information in a readable text format. text tools The programs that allow for the creation,modification,and searching of textfiles. vi editor A powerful command-line text editor available on most UNIX and Linux sys- tems. wildcard metacharacters The metacharacters used to match certain characters in a file ordirectory name;they are often used to specify multiple files. xemacs editor A graphical version of the Emacs text editor. Review Questions1.Which Linux command is used to display the current directory? a.cdb.pwdc.~ d.dir156Chapter 4EXPLORING LINUX FILESYSTEMS
Note: In case you are looking for affordable webhost to host and run your servlet application check Vision mysql5 web hosting services

Emacs (Editor MACroS) editor A popular and widespread (Web server extensions)

Thursday, June 28th, 2007

Emacs (Editor MACroS) editor A popular and widespread text editor more conducive toword processing than vi;developed by Richard Stallman. executable program A file that can be executed by the Linux operating system to run inmemory as a process and perform a useful function. fgrep command A variant of the grepcommand that does not allow the use of regularexpressions. file command A Linux command that displays the file type of a specified filename. filename The user-friendly identifier given to a file. filename extension A series of identifiers following a dot ( .) at the end of a filename usedto denote the type of the file;the filename extention .txt denotes a text file. gedit editor A text editor for the GNOME desktop. grep (Global Regular Expression Print) command A Linux command that searches filesfor patterns of characters using regular expression metacharacters. head command A Linux command that displays the first set of lines of a text file;by default, theheadcommand displays the first 10 lines. home directory A directory on the filesystem set aside for users to store personal files andinformation. insert mode One of the two input modes in vi;it allows the user the ability to insert textinto the document but does not allow any other functionality. kedit editor A text editor for the KDE desktop. less command A Linux command used to display a text file page-by-page on the terminalscreen;users can then use the cursor keys to navigate the file. linked file The files that represent the same data as other files. ll command An alias for the ls lcommand;it gives a long file listing. log file A file that contains past system events. ls command A Linux command used to list the files in a given directory. mcedit editor (Midnight Commander Editor) A user-friendly terminal text editor thatsupports regular expressions and the computer mouse. more command A Linux command used to display a text file page-by-page and line-by- line on the terminal screen. named pipe file A temporary connection that sends information from one command orprocess in memory to another;it can also be represented by a file on the filesystem. nedit editor A commonly used graphical text editor available in most Linux distributions. Chapter4155KEY TERMS
Note: If you are looking for high quality webhost to host and run your jsp application check Vision christian web host services

Anonymous web server - Chapter Summary .The Linux filesystem is arranged hierarchically

Thursday, June 28th, 2007

Chapter Summary .The Linux filesystem is arranged hierarchically using a series of directories to storefiles,and the location of these directories and files can be described using absolute orrelative pathnames. .Many types of files can exist on the Linux filesystem,such as text files,binary data, executable programs,directories,linked files,and special device files. .Thelscommand can be used to view filenames and offers a wide range of optionsto modify this view. .Wildcard metacharacters can be used to simplify the selection of several files whenusing common Linux file commands. .Text files are the most common file type whose contents can be viewed by severalutilities,such as head,tail,cat,tac,more,and less. .Regular expression metacharacters can be used to specify certain patterns of textwhen used with certain programming languages and text tool utilities such as grep. .Although many command-line and graphical text editors exist,vi (vim) is a power- ful,bimodal text editor that is standard on most UNIX and Linux systems. Key Terms~ metacharacter A metacharacter used to represent a user s home directory. absolute pathname The full pathname to a certain file or directory starting from the rootdirectory. binary data file A file that contains machine language (binary 1s and 0s) and stores infor- mation (such as common functions and graphics) used by binary compiled programs. cat command A Linux command used to display (or concatenate) the entire contents of atext file to the screen. cd (change directory) command A Linux command used to change the current directoryin the directory tree. command mode One of the two input modes in vi;it allows a user to perform any avail- able text editing task that is not related to inserting text into the document. concatenation The joining of text together to make one larger whole.In Linux,words andstrings of text are joined together to form a displayed file. directory A special file on the filesystem used to organize other files into a logical tree struc- ture. egrep command A variant of the grepcommand used to search files for patterns usingextended regular expressions. 154Chapter 4EXPLORING LINUX FILESYSTEMS
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision web design programs services

Sri lanka web server - As well,the GNOME and KDE GUI environments are

Thursday, June 28th, 2007

As well,the GNOME and KDE GUI environments are now distributed with their own texteditors (gedit editorandkedit editor),which are similar to nedit yet offer more functionality. Examples of the displays seen when a user types gedit project4andkedit project4on acommand-line terminal in a GUI environment are shown in Figures 4-5 and 4-6,respectively. Chapter4153EDITING TEXT FILES FIGURE 4-5The gedit text editor FIGURE 4-6The kedit text editor
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision web design programs services