Save time at the command line with shell aliases and functions
Familiarity with command prompts and shell scripts is still necessary if you want to get the most from your GNU/Linux system, but the less time you spend doing that the better, right? Two powerful ways to minimize your time at the command line are shell aliases and functions.
The examples that follow are for the bash shell, but all the concepts and most of the code are valid for other shells too.
Shell aliases are alternative, easy-to-remember names for long commands that you need to execute frequently. When you type at the command line, the shell first looks for what you wrote in its list of aliases. If it finds a match, it replaces the alias with its corresponding text; after that, it looks again at the whole resulting command line and executes it. Here are some examples of aliases definitions:


Recent comments
3 hours 11 min ago
3 hours 11 min ago
3 hours 40 min ago
4 hours 36 min ago
7 hours 10 sec ago
1 day 25 min ago
1 day 2 hours ago
1 day 3 hours ago
1 day 7 hours ago
1 day 12 hours ago