Using !$ To Use Last Parameter
Much like using Alt+. to print out last parameter you can also use !$ to use the last parameter from the previous command. Here is a simple example.
# cd ..
# cd !$
In this example we are moving up a directory and then doing the same action again, the !$ is a short cut to get hold of the ... This is more useful when doing things with longer parameters like directory or file names. For example here we are creating a directory and then moving into that same directory.
# mkdir /www/htdocs/directory/
# cd !$
Write a comment