Last year a friend taught me about the bash trick "CTRL-R" <start typing 'ssh' or some other previously run command> on the command line for reverse history searching, and it is an amazing time saver. It acts as a great alternative to #8, "Find the last command that begins with “whatever,” but avoid running it"
When I need to do number one -- add sudo to the previous command -- I just use the up arrow, Ctrl-a to get to the beginning of the line, and add sudo. It's a little slower than the method in the article, but I find it downright dangerous to have something in your command history that means "do whatever was typed previously as root".
Couple of little nits - 5. and 8. are not bash specific and neither are event designators, these work fine in tcsh and zsh. I think caret substitution might have actually come from the *csh world. Not that big of a deal since bash is so prevalent these days but hey, a pedantipoint is a pedantipoint.
[+] [-] colonhyphenp|16 years ago|reply
$ !whatever:p
[+] [-] 10ren|16 years ago|reply
[+] [-] oyving|16 years ago|reply
[+] [-] araneae|16 years ago|reply
[+] [-] duck|16 years ago|reply
:w !sudo tee %
I've used vim for a long time, but didn't know about this one.
[+] [-] erlanger|16 years ago|reply
[+] [-] sketerpot|16 years ago|reply
[+] [-] chronomex|16 years ago|reply
[+] [-] unknown|16 years ago|reply
[deleted]
[+] [-] pvg|16 years ago|reply
[+] [-] pkrumins|16 years ago|reply
[+] [-] 10ren|16 years ago|reply
[+] [-] aw3c2|16 years ago|reply
Is there a way to use a better codec?
[+] [-] pkrumins|16 years ago|reply
The output codec? Use `-vcodec <format>`, where <format> is a video coded output by `ffmpeg -formats`.
Update: The whole comment about kbit/s was actually unnecessary, so I edited the article and replaced it with a better comment.
[+] [-] sown|16 years ago|reply
$ ls a b c
a b c
$ ls !$
ls c
c
$ ls a b c
a b c
$ ls !:3 !:2 !:1 !:0
ls c b a ls
ls: ls: No such file or directory
a b c
$
[+] [-] eplanit|16 years ago|reply
[+] [-] bho|16 years ago|reply