ls -l /path/to/fileThen we decide we want to change permissions of that file. Instead of retyping out the entire path again we can use
chmod +x (then press 'Esc+.' to fill out the path /path/to/file)
Alternatively there is a bash argument called !$ which stores the value of the previous argument of the command so you could also use
chmod +x !$To achieve the same result as the previous command.
Another interesting method is using bash history again to specify which argument you would like from the previous listing
!:* - all arguments !:n - where 'n' is the n'th argument 1:$ - where '$' is the last argument