Learning Linux Commands142Repeating previously typed commandsTo make repeating (Web page design)

Learning Linux Commands142Repeating previously typed commandsTo make repeating long commands easy for you, Bash stores up to 500 oldcommands. Bash keeps a command history(a list of old commands). To seethe command history, type history. Bash displays a numbered list of the oldcommands, including those that you entered during previous logins. If the command list is too long, you can limit the number of old commands youwant to see. To see only the most recent 10 commands, type this command: history 10To repeat a command from the list that the historycommand shows, simplytype an exclamation point (!), followed by that command s number. To repeatcommand number 3, type !3. You can repeat an old command without knowing its command number. Suppose you typed more /usr/lib/X11/xdm/xdm-configa few minutesago, and now you want to look at that file again. To repeat the previous morecommand, type the following: !moreOften, you may want to repeat the last command that you just typed, perhapswith a slight change. For example, you may have displayed the contents ofthe directory by using the ls -lcommand. To repeat that command, typetwo exclamation points as follows: !! Sometimes, you may want to repeat the previous command but add extraarguments to it. Suppose that ls -lshows too many files. Simply repeatthat command, but pipe the output through the morecommand as follows: !! | moreBash replaces the two exclamation points with the previous command andthen appends | moreto that command. Here s the easiest way to recall previous commands. Just press the up-arrowkey and Bash keeps going backward through the history of commands youpreviously typed. To move forward in the command history, press the down- arrow key. Learning Linux CommandsYou type Linux commands at the shell prompt. By Linux commands,I meansome of the commands that the Bash shell understands as well as the
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check Vision mysql hosting services

Leave a Reply