Aliases (PowerShell users, skip this section)¶
Since we saw that rm is a wrecking ball, we should temper it using the -i flag. For safety, we would like rm to always ask us about deletion. We can instruct bash to do this for us by creating an alias.
alias rm="rm -i"
After executing this, any time we use rm, bash will instead execute rm -i, thereby keeping us out of trouble.
One of my favorite aliases is to make ls list things more prettily.
alias ls="ls -FG"
The -F flag makes ls put a slash at the end of directories. This helps us tell the difference between files and directories. The -G flag enables coloring of the output, also useful for differentiating file types.
Copyright note: In addition to the copyright shown below, this recitation was developed based on materials from Axel Müller.