본문 바로가기
Server/command

History 명령 다른 이름으로 저장하기

by 100xoo 2024. 3. 21.

history -w abc

history -w abc.txt

...

 

그런데 여러 개의 시스템에서 호스트네임.txt으로 history를 저장하고 싶다면

history -w "$(hostname -s).txt"

 

여기서 날짜까지 따로 지정하여 저장하려면(다른 텍스트 추가)

history -w "$(hostname -s)-20240321.txt"

 

'Server > command' 카테고리의 다른 글

History 명령 원하는 라인 삭제하기  (0) 2024.03.21