Move around the command line faster
You know how you have to use the arrow keys to move char by char around a command line? It sucks. A couple of shortcuts that make it easier are:
Ctrl + A Go to the beginning of the line.
Ctrl + E Go to the end of the line.
Ctrl + W Erase the previous word.
Also, I sometimes have to do two or three things to the same file. For that I use !^, that inserts the argument of the previously executed line:
$ cat /home/jair/very/long/path/file.txt
This file should not be here.
$ mv !^ somewhere/else
Written by Jair Trejo
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#