
맥에서 리눅스로 옮겼어요
내 것을 백업했어요zsh_history.txt
이것을 내 파일에 어떻게 병합/추가합니까 .bash_history
?
형식이 다른 것을 확인했습니다.
git pull
#1530441990
git push
#1530447814
locate "*ls*" | grep -P 'history'
#1530447865
echo $HISTFILE
#1530448256
: 1470922871:0;git clone
: 1470923028:0;git clone sso://waze-bimqa-internal/RoutingRegression
: 1470924442:0;ls -ltrh `echo $JAVA_HOME`
: 1470924459:0;java -v
: 1470924464:0;which java
답변1
타임스탬프에 관심이 없다면 이 history -s
명령을 사용하여 기록에 줄을 추가 할 수 있습니다 bash
.
bash-4.2$ history -s foo
bash-4.2$ history -s this is a command
bash-4.2$ history 3
31 foo
32 this is a command
33 history 3
텍스트 파일을 조작하여 history -s
명령을 생성한 다음 source
명령을 생성할 수 있습니다.