개발/터미널

terminal. 명령어 history

ttoance 2022. 5. 8. 21:14

 

echo $HISTFILE

 

history

 

- !-3 : 3번째 최신것 실행 

- !{command_name} : 으로 명령어 검색 가능

> 하지만 바로 실행된다. 

 

 

ㄴ !ping:p 이렇게 치면 어떤 명령어인지 보여줌

 

 

위 화살표 / ctrl + p : 명령어 히스토리

아래 화살표 / ctrl + d : 명령어 히스토리

 

ctrl + r : recall 모드로 진입 > 검색 가능

ctrl + g 로 나오기 가능

 

history 삭제 시 history -d 107

history -c : 전체 삭제

 

 

 

 

 

 

 

 

# history에 시간날짜 기록하고 싶을 때 

HISTTIMEFORMAT="%d/%m/%y %T"

 

 

 


 

 

Bash HISTSIZE vs. HISTFILESIZE | Baeldung on Linux

In this tutorial, we'll look at the meaning of the Bash HISTFILESIZE and HISTSIZE variables.

www.baeldung.com

 

반응형