|
|
|
|
|
by Normille
1889 days ago
|
|
I upvoted for this alone: Another neat short hand is !$ which is an alias for the last argument of the previous command. This can be handy if one creates a new directory and wants to change into it without typing the the directory again. So commands would be
mkdir -p make/new/directory
cd !$
You've no idea how many years I've been thinking "This is Linux fer gawd's sake. Surely there must be some easy way to make a new directory and 'cd' to it in a single command!" But was never able to find or guess the right incantation. |
|
mkcd() { mkdir -vp "$1" && cd "$1"; }