I just came across two handy bash tricks
1 - If you need to run a different command on a file you just executed a command on, without retyping the filename.
ex:
An easy way is
2 - Switching back and forth between the last two directories.
1 - If you need to run a different command on a file you just executed a command on, without retyping the filename.
ex:
- ls file1234.txt
- more file1234.txt
An easy way is
- ls file1234.txt
- more !^
2 - Switching back and forth between the last two directories.
cd -check man pushd for multiple directories.