Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Command history
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Software feature}} '''Command history''' is a feature in many [[command-line interpreter|operating system shells]], [[computer algebra]] programs, and other [[Computer software|software]] that allows the user to recall, edit and rerun previous [[command (computing)|commands]]. Command line history was added to [[Unix]] in [[Bill Joy]]'s [[C shell]] of 1978; Joy took inspiration from an earlier implementation in [[Interlisp]].<ref>[http://www.kitebird.com/csh-tcsh-book/csh-intro.pdf''An Introduction to the C shell''] {{Webarchive|url=https://web.archive.org/web/20180713012111/http://www.kitebird.com/csh-tcsh-book/csh-intro.pdf |date=2018-07-13 }} by [[Bill Joy]].</ref> It quickly became popular because it made the C shell fast and easy to use. History has since become a standard feature in other shells, including [[KornShell|ksh]], [[Bash (Unix shell)|Bash]] and [[Microsoft]]'s [[cmd.exe]]. History addressed two important scenarios: # Executing the same command or a short sequence of commands over and over. An example might be a developer frequently compiling and running a program. # Correcting mistakes or rerunning a command with only a small modification. In Joy's original C shell, the user could refer to a previous command by typing an exclamation, <code>!</code>, followed by additional characters to specify a particular command, only certain words, or to edit it in some way before pasting it back into the command line. For example: :<code>!!</code> meant the entire previous command. :<code>!$</code> meant just the last word of the previous command. :<code>!''abc''</code> meant the command that started with ''abc''. The usual implementation today is to combine history with command-line editing. The cursor keys are used to navigate up and down through the history list and left or right to anyplace on the line, where the user can simply type a desired change. But some implementations are [[Menu (computing)|menu]]-based: The user presses a certain function key which displays a menu of recent commands, which the user can select one by typing a number. Some implementation such as [[Bash (Unix shell)|Bash]] support to record command history to a file (<code>history</code> command).<ref>{{Cite web|url=https://en.wikiversity.org/wiki/Bash_programming/Bash_History|title = Bash programming/Bash History - Wikiversity}}</ref><ref>{{Cite web|url=https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Bash-History-Builtins|title = Bash Reference Manual}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)