fc (Unix)

fc is a standard program on Unix and Unix-like operating systems that lists, edits and reexecutes commands previously entered to an interactive shell. fc is a builtin command in the Bash and Zsh shells and is an initialism for "fix command". It is particularly helpful for editing complex, multi-line commands. The editor can be specified by setting the EDITOR (changes the default editor) or the FCEDIT environment variable.

fc
Operating systemUnix, Unix-like, Inferno
TypeCommand

Examples

$ fc -l
1001 ls
$ fc -s 1001
ls
$ fc
[Change 'ls' to 'ls -la' in editor and exit]
ls -la
...
gollark: I shall work on federation tomorrow, assuming no Klingon attacks.
gollark: Okay,I very fixed it.
gollark: Okay, I should have fixed it.
gollark: That is indeed a problem; a problematic one, too.
gollark: https://osmarks.tk/skynet/View logs of skynet servers with this convenient interface!They're not persisted across server restarts though.

See also

  • fc: process the command history list  Commands & Utilities Reference, The Single UNIX Specification, Issue 7 from The Open Group
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.