//View Tip #194
Similar Tips
» Vi mode in bash
» Diff Two Directories
» View non-printing characters with cat
» Loop over files with spaces in the name
» Counts files in the current directory and subdirectory

 

Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow
If, like me, you often make mistakes on the command line, try using the history shortcut '^^' to repeat the last command with changes.

For example:

$ cat fiel
cat: fiel: No such file or directory
$ ^el^le
cat file


View Comments »




Comments 

Add your comment

Comments are currently disabled
Ian
CTRL-t is also good for typos like this, and depending on the location of the error, less keystrokes.

Using the example, place the cursor in between "el" then press CTRL-t to transpose the two letters.
Posted 2010-06-24 03:30:08

Home Latest Browse Top 25 Random Hall Of Fame Contact Submit