All Articles

Best Practise of Bash

bash

The UNIX-like operating system users should be familiar with shells. Most of the shells provide tips to help users with the commands. Here are some examples to make use of bash (the Bourne Again SHell).

  • the up/down arrow keys

The basic usage of history records is to use your up/down arrow keys to browse the history records, press enter when you want to issue the history record again.

  • the tab completion

After typing a few prefix letters of a command, a Tab could be pressed to complete the command.

  • use !$ to replace the last parameters entered

It would be useful if you want to operate several times on the same files.

  • start the command with !

The auto completion will be limited to history records when you hit the tab.

Published Jul 9, 2007

Flying code monkey