Difference between revisions of "History --help"

From wikieduonline
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{lowercase}}
 
{{lowercase}}
  
  history --help
+
  [[history]] --help
 
  history: history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]
 
  history: history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]
 
     Display or manipulate the history list.   
 
     Display or manipulate the history list.   
Line 9: Line 9:
 
   
 
   
 
     Options:
 
     Options:
       -c clear the history list by deleting all of the entries
+
       [[-c]] clear the history list by deleting all of the entries
 
       -d offset delete the history entry at position OFFSET. Negative
 
       -d offset delete the history entry at position OFFSET. Negative
 
     offsets count back from the end of the history list  
 
     offsets count back from the end of the history list  
Line 16: Line 16:
 
       -n read all history lines not already read from the history file
 
       -n read all history lines not already read from the history file
 
     and append them to the history list
 
     and append them to the history list
       -r read the history file and append the contents to the history
+
       [[-r]] read the history file and append the contents to the history
 
     list
 
     list
 
       -w write the current history to the history file  
 
       -w write the current history to the history file  

Latest revision as of 14:11, 25 January 2024

history --help
history: history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]
    Display or manipulate the history list.  

    Display the history list with line numbers, prefixing each modified
    entry with a `*'.  An argument of N lists only the last N entries. 

    Options:
      -c	clear the history list by deleting all of the entries
      -d offset	delete the history entry at position OFFSET. Negative
    		offsets count back from the end of the history list 

      -a	append history lines from this session to the history file
      -n	read all history lines not already read from the history file
    		and append them to the history list
      -r	read the history file and append the contents to the history
    		list
      -w	write the current history to the history file 

      -p	perform history expansion on each ARG and display the result
    		without storing it in the history list
      -s	append the ARGs to the history list as a single entry 

    If FILENAME is given, it is used as the history file.  Otherwise,
    if HISTFILE has a value, that is used, else ~/.bash_history.
 
    If the HISTTIMEFORMAT variable is set and not null, its value is used
    as a format string for strftime(3) to print the time stamp associated
    with each displayed history entry.  No time stamps are printed otherwise.

    Exit Status:
    Returns success unless an invalid option is given or an error occurs.


See also[edit]

Advertising: