If you ’ve spent clip in Terminal , more than likely you ’ve made a typo or two — or two hundred thousand , if your typing truth is anything like ours ! It ’s one of the banes of working in Unix — after years of point - and - get across , have to type sometimes prospicient and complex commands by hired man leads to inaccuracies . And , sad to say , Terminal is n’t nearly as lenient with typos as are Word and other school text editor in chief .
As an model , rent ’s say you were test to change the directory to the Applications brochure . The dictation would wait like this in Terminal ( the%is the command prompting ):
But in your haste to typewrite the command , you typeAppplicationsinstead ofApplications . Terminal then helpfully tells you :
One way to touch on this error is to utilise the arrow keys to move to the right spot in the command , and contract Delete at the right spot . ( And yes , this bid is short enough so that re - entering it completely is n’t complicated or takes much time . Go with us here , it ’s an example . )
Here ’s a potentially easier method for more complicated commands : practice the caret character ( ^ ) . at once after you get the mistake in Terminal , start the next command with the caret , type in the serving of the anterior command that you need to fix , type another caret , and then type the counterbalance interpretation of the command . In this example , it was the threepcharacters that were wrong ; it should only have been two . So to fix that , you ’d enter this bid :
When you press Return , Terminal will re - execute the anterior command , making the fudge factor you indicated . And to let you know what happened , Terminal will also recall the right instruction that was executed :
You may not expend this every day , but it ’s a squeamish timesaver for those times when you do make a mistake .