Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

1
  • 5
    alias r='fc -e -' is a valuable alias to rerun previous commands. fc on its own originated in Korn shell, I believe. You can specify commands by number (fc 123 129 to edit command numbers 123 to 129 in the history). You can specify relative numbers (fc -10 -1 to edit the last 10 commands entered). You can list previous commands with fc -l. You can specify a command by prefix with the r alias (r make runs the last invocation of make; so does r m if you've not run a mv command since you last ran make, etc.). Commented Jul 13, 2012 at 19:20