Recent Posts
Recent Comments
변군이글루
[명령어] history 명령어 본문
history 명령어
Bash History 설정
$ cat <<EOF >> /etc/profile
## history
export HISTSIZE=10000
export HISTTIMEFORMAT='%Y-%m-%d %H:%M:%S '
#export HISTCONTROL=erasedups
EOF
Print ‘n’ Lines
$ history 2
$ history 2
919 2021-01-28 21:20:43 echo "history command"
920 2021-01-28 21:20:59 history 2
Repeat Specific Command
$ !번호
$ !917
echo "history command"
history command
Repeat Most Recent Command
$ !!
$ !!
echo "history command"
history command
Reverse Search
$ ^r (Crtl + r)
Delete Specific Line
$ history -d 925
$ echo 111
111
$ history 3
924 2021-01-28 21:47:03 history
925 2021-01-28 21:47:23 echo 111
926 2021-01-28 21:47:33 history 3
$ history -d 925
$ history 3
925 2021-01-28 21:47:33 history 3
926 2021-01-28 21:47:45 history -d 925
927 2021-01-28 21:47:46 history 3
'* 리눅스' 카테고리의 다른 글
[VMware] ESXi 7.x에서 SNMP 활성화 (0) | 2021.02.04 |
---|---|
[Ubuntu] 우분투 기본 에디터 변경하기 (0) | 2021.02.01 |
[명령어] history 명령어 (1) | 2021.01.28 |
[GIT] 깃 태그(git tag) 생성, 삭제 (0) | 2021.01.27 |
[GIT] 깃 브랜치(git branch) 생성, 삭제 (0) | 2021.01.27 |
[리눅스] CentOS 8에서 CentOS Stream으로 마이그레이션 (1) | 2021.01.26 |
1 Comments