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.
Operating system | Unix, Unix-like, Inferno |
---|---|
Type | Command |
Examples
$ fc -l
1001 ls
$ fc -s 1001
ls
$ fc
[Change 'ls' to 'ls -la' in editor and exit]
ls -la
...
gollark: You need the eGPU and a Thunderbolt-capable laptop and lose performance anyway.
gollark: That's probably just more expensive.
gollark: They also have to be smaller.
gollark: I have a laptop which in theory can manage a few hours, but end up never using it because if I use the battery it gets slightly worse at storing energy.
gollark: They are more portable than desktops, at least, which you may want.
External links
- : 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.