Table A-7 (continued) CommandPurposelessShows the file a (Apache web server) screen

March 11th, 2008

Table A-7 (continued) CommandPurposelessShows the file a screen at a time. moreShows the file a screen at a time. tailShows the last ten lines of a file. File system commandsThese commands, listed in Table A-8, provide information or perform actionson the entire file system, from creation and tuning to repair and recovery. Some of these commands return data only, whereas others also provide youwith surgical instruments for serious file-system hacking: Table A-8File System CommandsCommandPurposebadblocksSearches a partition for bad blocks. e2fsckChecks and repairs an ext2 or ext3 filesystem. e2labelApplies a filesystem label to an ext2 or ext3 partition. ejectEjects a CD or DVD. fsckCan check and repair many types of filesystems. mkfsCreates a filesystem (format a partition). mountLoads a partition into your filesystem. syncSaves all information out of buffers onto disks. tune2fsAdjusts ext2 and ext3 filesystem parameters. umountRemoves a partition from the filesystem. mtoolsThe mtools suite of utilities provides a nice way to transfer information toyour Microsoft friends. Although Linux has native support for MicrosoftWindows and DOS file systems, your Microsoft cohorts don t have access 400Part VI: Appendixes

Table A-5File Attributes CommandsCommandPurposechgrpChanges the group associated with (Web servers)

March 9th, 2008

Table A-5File Attributes CommandsCommandPurposechgrpChanges the group associated with a file. chmodChanges a file s permissions. chownChanges who owns a file. fileShows what type of file you re dealing with. statShows some statistics about the file. touchCreates an empty file of this name. wcShows how many words, lines, and so on are in this file. File locatorsWhere, oh, where can my file be? These commands, shown in Table A-6, helpyou locate files in Linux s monster tree-structure file system: Table A-6File Locators CommandsCommandPurposefindHard-core filesystem search tool. locateLighter weight filesystem search tool. whichTells you the path for the program that would be run if youtyped this command. File viewersFile browsing is a favorite pastime of many a system user. These tools pro- vide a variety of utilities for viewing the contents of readable files of all sizes. Unlike using a full-screen editor, you cannot damage the contents of a filewith these commands, shown in Table A-7, because they re read-only tools: Table A-7File ViewersCommandPurposecatDumps the contents of the file to your screen. headShows the first ten lines of a file. (continued) 399Appendix A: Common Linux Commands31_

Files and file systemNo matter which operating system (Web site directory)

March 8th, 2008

Files and file systemNo matter which operating system you re using, it s hard to do anything with- out being able to find your way through and work with the file system. Thefollowing utilities help you find your way: File organizationBoxing, packing, sorting, shipping I m always shuffling files around on mysystem. File organization commands provide tools for moving files and filesystem units around, as shown in Table A-4. Table A-4File Organization ToolsCommandPurposecdChanges directories. cpCopies a file. dfShows partitions and how much space they have. duShows how much disk is being used in the current directoryand below. lnCreates a shortcut. lsLists the contents of a directory or information about a file. mkdirCreates a directory. mvMoves or renames a file. pwdShows the path for the directory you re currently in. rmDeletes a file. rmdirDeletes an empty directory. File attributesFiles are much like candy bars. The wrappers provide information about theingredients, size, and package date all descriptive of the tasty nuggetinside. (Perhaps the wrapper is even childproof.) Files keep all this wrapperinformation in an inode.Along with the capability to change file inode infor- mation, these commands can return data about the content of the file, asshown in Table A-5.398Part VI: Appendixes

Web site counters - CommandPurposehistoryLists off the last 1,000 commands you ve typed.

March 8th, 2008

CommandPurposehistoryLists off the last 1,000 commands you ve typed. unaliasRemoves command shortcuts. If you try to view the manpage entry for some of these commands, you findinstead the help information for BASH BUILTINSloads. To search throughthis massive manual, press the forward slash (/) key to open the mansearchinterface and then type the name of the command you want to search for. Press Enter to start the search. The interface stops in the first spot where theterm is found. If you want to try again, press the N key to proceed to the nextoccurrence of the word. For example, you might be reading the massive bash man page (type manbashto access this page), but perhaps you re only interested in items relatedtoprompts,which are the bits of text that appear to the left of your cursor ina text window. An example prompt is[dee@catherine dee]$ So, you might type /promptand press Enter to jump down to the firstinstance of this word. If the text around the word doesn t reflect what you relooking for, you d press the N key to jump to the next one, and so on. Getting HelpWhen you re digging around for help on a command, you can call on an inter- esting range of shell commands for assistance, as shown in Table A-3. Table A-3Shell Help CommandsCommandPurposeaproposLooks for commands that contain a keyword in their man page descriptions. infoOne way of finding help information. You can find instructions for thistool at www.gnu.org/software/texinfo/manual/info/ manThe primary way of getting help in Linux and Unix. whatisGets a one-line description of a command. Locating details about the command-prompt options of a command is anever-ending pursuit. The manpage system provides some helpful guides atyour fingertips for rapidly finding this detailed information. 397Appendix A: Common Linux Commands31_

Archiving and compressingAlthough disk space isn t as much (Web site design)

March 7th, 2008

Archiving and compressingAlthough disk space isn t as much of a premium as it once was, bandwidthand backup media still are. Subsequently, this group provides a potpourri oftools for compacting and organizing data for storage, as shown in Table A-1. Table A-1Archiving and Compressing ToolsCommandPurposebzip2Compresses files into .bz2format. Used mostly for incredibly large sets of text files (which is what sourcecode actually is). compressCompresses files into .Zformat. Pretty old and not used much in the Linux world. gunzipUncompresses .gzfiles and .tgzfiles. gzipCompresses files into .gzformat. tarPackages files together in a group. uncompressUncompresses files from .Z format. unzipUncompresses files from .zipformat. zipCompresses files into .zipformat. Built-in bash commandsSome commands don t even seem to exist if you try to look up their helpinformation in the manpages, and the commands don t show up as files onyour system. Remember, as you type commands at the prompt, that you recommunicating with a type of program called a shell.(In my case, it s bash, the default Linux shell.) The shell has a set of commands, included in the fol- lowing list, that you can use to communicate with it, as shown in Table A-2. Table A-2Shell CommandsCommandPurposealiasCreates command shortcuts. envLists your current environment variables and their settings. exportWhenever you re told to set an environment variable, use this first so that the variable will be remembered properly. 396Part VI: Appendixes

Appendix ACommon Linux CommandsIn This Appendix Archiving and (Christian web host)

March 6th, 2008

Appendix ACommon Linux CommandsIn This Appendix Archiving and compression commands Communication commands File commands System control commandsComputing novices often marvel at the keyboard dance Linux experts typ- ically perform. Sure, these experts know about modern advances like themouse and graphical interface, but these keyboard musicians prefer the homekeys and find that they can work faster with the keyboard. It takes some timeto reach this level of proficiency, but every expert was a novice at one time, and any novice can become an expert by delving into the various commandsavailable and getting plenty of practice. In this appendix, you find the commands listed by themes, according to whatthey can actually do for you. So, read on and dazzle your friends with your command-prompt finesse. When they ask you how and where you figured out all those commands, justsmile and mumble something about the voices in your head and, ofcourse, keep this section dog-eared and within reach of your computer. Linux Commands by FunctionBecause every command serves a specific purpose, organizing these toolsinto groups according to their individual functions isn t difficult. If you knowwhat you need to do but don t know which command does the job, flipthrough this section to start your search. From here, you can dig further byreferencing manpages and other help information (online sites and referencebooks, for example) or by looking in this book s index for further coverage. To access a manpage, type man commandat a command prompt. For exam- ple, man lsshows you the help information for the file listing command.

Hp web site - In this part . . . This part

March 6th, 2008

In this part . . . This part adds some extra material to support the rest of this book. Starting with the ever-popular and usefulAppendix A, you find a reasonably comprehensive andfriendly compendium of common Linux commands, readyfor use as a desktop reference. Appendix B provides anoverview of and information about the DVD included withthis book (and how to get a set of CDs if you don t have aDVD-ROM drive), including basic booting instructionswhen installing Red Hat Linux and a list of what s on the DVD.

Web site developers - Part VIAppendixes30_

March 5th, 2008

Part VIAppendixes30_

392Part V:The Part of Tens (Web hosting uk)

March 4th, 2008

392Part V:The Part of Tens

Space web hosting - then the problem may be hard-drive oriented. If

March 3rd, 2008

then the problem may be hard-drive oriented. If you run into identical prob- lems with Knoppix that you did under Windows or another form of Linux, then you have more hints there. I had problems on one machine with three different distributions, and after a lot of frustration and observation, I realized that the machine only crashedin the GUI in all three, and never when I was just using the command line. I changed the machine s video card and voil , everything was fine. Exploring Tons of Linux ToolsKnoppix comes with an amazing array of tools for just one CD-ROM. You canplay with multimedia tools for television, sound editing, and more withouthaving to hunt down and install a new piece of software. When you find some- thing you really like, then you can go about seeing whether you can get it andadd it for your own distribution. Heck, a lot of this software is available forWindows, too! You can also use Knoppix to test documents like Web sites and word- processing files to make sure that they work right under Linux. You can even check to see whether WINE (see Chapter 19) can handle a particularWindows program that you re hoping to run, because WINE comes installedby default in Knoppix. If the program works in Knoppix, you might then notbother to install WINE under another distribution. 391Chapter 21: Ten CoolUses for Knoppix29_