Perhaps not unique, but something ive rarely come upon when reading CLI guides. A few useful bash shortcuts.
(^ being control, M being the meta, usually alt or esc)
- jump to beginning of line, handy e.g. when you just want to change the command but keep that 4 line filepath intact
- jump to ending of line, useful in similar situations
- reverse search of your command history, "I want to ssh back to the server I did last night" >> ^r <type ssh> "uups not that one, the one before that" ^r "thats the one" <hit enter to execute rightaway
- So that would be alt+. if you dont get what I mean. It pastes the last argument of your last command executed. very
nifty a command when you think of it. e.g.
ls -la /path/to/some/weird/partition/and/for/the/heck/of/it/wonderland/in/there/file.you.realy.need.mp3
# then we want to do something else to it, like move it.. and preferably not type the location again.. d:
mv <M.> /mnt/tmp/mp3/
Wasnt that nifty? (:
I use these every single day and sofar have seen only one site that demonstrated their existance (if you dont count the bash man ofcourse (;)
There are plenty more of shortcuts for bash but either theyre more cryptic, well documented and learned or useless imo (:
btw, great article AwesomeMachine, will have to check my disks out..