Renaming/moving files with suffixes quickly:
1 |
cp /home/foo/realllylongname.cpp{,-old} |
This expands to:
1 2 3 4 |
cp /home/foo/realllylongname.cpp /home/foo/realllylongname.cpp-old -------------- Bash search / replace |
1 2 |
$ ehco foo bar baz bash: ehco: command not found |
1 2 |
$ ^ehco^echo foo bar baz |
1 2 3 |
-------------- Inserts the last arguments from your last bash command. I'll have to try to remember this one.. |
1 2 |
<code>cp file /to/some/long/path </code> |
cd ESC.
——————-
1 2 3 |
<code>ctrl-E # move cursor to end of line ctrl-A # move cursor to beginning of line </code> |