Tips & Tricks


Here is an example :

$ ls /home/himanshu/practice/*.py
/home/himanshu/practice/firstPYProgram.py

$ ls -lart !$
ls -lart /home/himanshu/practice/*.py
-rw-rw-r– 1 himanshu himanshu 50 Mar 1 00:23 /home/himanshu/practice/firstPYProgram.py

So we see that ‘!$’ can be used to fetch argument from previous command and use it with the current command.

Go Back to Menu