이전 명령을 다시 실행하기:
history
1 pwd
2 cp memo.txt /tmp
3 cd
4 history
!!
1 pwd
2 cp memo.txt /tmp
3 cd
4 history
5 history
history 명령은 history list를 보여주는 명령입니다. 윗 예제에는 바로 이 명령을 반복한 것입니다.
특정 명령 실행하기:
!3 cd
윗 예제은 앞에서 나타난 history list의 세번째 명령을 다시 실행하는 경우입니다.
특정 문자열로 시작하는 명령 실행하기:
!pw pwd /home/grace
특정 문자열을 포함하는 명령 실행하기:
!?st history