history Flashcards

1
Q

history

A

The GNU History library is able to keep track of those lines, associate arbitrary data with each line, and utilize information from previous lines in composing new ones.

The history command with no options will print everything.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

export HISTTIMEFORMAT=’%F %T ‘

A

Changing this variable will make the history command display with a date and time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

export HISTIGNORE=’ls -l:pwd:date: ‘

A

This filters commands in history.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

export HISTCONTROL=ignoredups

A

Changing this variable will ignore duplicate commands in the history.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

export HISTSIZE=0

A

Changing this variable disables history from recording commands.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

history -c

A

Clears the current history.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

history

  • w
  • d
A
  • w, write the current history to the history file.
  • d offset, deletes the history entry at position OFFSET. Negative offsets count back from the end of the history list.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

history

  • a
  • n
  • r
  • p
  • s
A
  • a, apped 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.
  • 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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly