The capability of the Linux file system to (Web host sites)

The capability of the Linux file system to deal with practically unlimited sizesof filenames means that many filenames can become huge. Typing these longfilenames can become cumbersome. Fortunately, with command completion, typing a command or a long filename is short work. You may want to use command completion in two situations: to enter a com- mand or to complete a filename. Completing a commandSuppose that you want to type a command, but you can remember only thatit begins with the letters upand is supposed to return the length of time thathas passed since the system was rebooted. Type upat the command promptand then press Tab: [evan@deepthink evan]$ up[TAB] One of two things happens: If only one matching command is in the search path(directory locationsfor searching for programs; type echo $PATHto find out what yours is), your command line is completed with that command, and the systemwaits for you to press Enter to execute the command. If you hear a beep, it means that more than one command begins withup. Simply press Tab a second time, and all the possibilities are displayed. Locate the command on the list and continue typing it until the first let- ters are unique, at which point you can press the Tab key to completethe command. Completing a filenameCommand-line completion isn t only for commands; if you re typing a file- nameon your command line, you only need to type the first few charactersand then press Tab. The shell usually searches the current working directoryfor filenames that match what you have typed and subsequently completesthe filename on the command line. This feature behaves the same way as thecommand-completion feature in that, if more than one file contains the lettersyou type, you hear a beep and need to press Tab again to see a list of choices. It takes a little getting used to, but after you have control of the Tab key andthe shell command-line completion feature, you may wonder how you evergot along without it. Accessing your command historyIt s nice of the shell to remember what you have done, for better or worse. Having the shell keep track of the commands you enter makes it easy to283Chapter 14: Working without the GUI20_

Leave a Reply