history 가끔 사용을 하는데, 사용법을 잘 모를때가 있어 찾게 되네요.
이참에 정리한번 합니다.
history 명령을 입력하면, 지금까지 사용한 명령들이 나타납니다.
아래는 사용 예입니다.
1. 최근 사용한 명령 20개 보기
[root@localhost ~]# history 5388 [2010-12-02 14:33:01] ls389 [2010-12-02 14:33:51] history390 [2010-12-02 14:34:58] history -n 20391 [2010-12-02 14:35:01] history 20392 [2010-12-02 14:35:51] history 5
2. history 내용을 지워보자
[root@localhost ~]# history -c
3. 방금전에 실행했던 명령 실행하기
[root@localhost ~]# !!
4. 실행한 명령들의 번호로 실행하기
[root@localhost ~]# history 5167 [2010-12-02 14:39:45] history168 [2010-12-02 14:40:15] history169 [2010-12-02 14:40:24] history 5170 [2010-12-02 14:40:35] ls171 [2010-12-02 14:40:37] history 5[root@localhost ~]# !170lsanaconda-ks.cfg install.log install.log.syslog
5. 특정단어로 시작하는 가장 최근 명령 실행하기
[root@localhost ~]# !hishistory 5172 [2010-12-02 14:41:42] ls173 [2010-12-02 14:42:17] history 5174 [2010-12-02 14:42:42] history 3175 [2010-12-02 14:43:03] history 5176 [2010-12-02 14:43:34] history 5
6. 이전 명령 보기
[root@localhost ~]# !!:phistory 5
7. history 내용이 저장되는 위치
/root/.bash_history
게시판 목록
팁게시판
디자인과 관련된 유용한 정보를 공유하세요.
질문은 상단의 QA에서 해주시기 바랍니다.
질문은 상단의 QA에서 해주시기 바랍니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 4377 | 13년 전 | 808 | ||
| 4376 | 13년 전 | 571 | ||
| 4375 | 13년 전 | 376 | ||
| 4374 |
senseme
|
13년 전 | 836 | |
| 4373 | 13년 전 | 2850 | ||
| 4372 | 13년 전 | 1911 | ||
| 4371 | 13년 전 | 1478 | ||
| 4370 | 13년 전 | 443 | ||
| 4369 |
senseme
|
13년 전 | 1068 | |
| 4368 |
senseme
|
13년 전 | 1904 | |
| 4367 |
senseme
|
13년 전 | 1045 | |
| 4366 |
senseme
|
13년 전 | 1074 | |
| 4365 |
senseme
|
13년 전 | 809 | |
| 4364 |
senseme
|
13년 전 | 978 | |
| 4363 | 13년 전 | 1958 | ||
| 4362 | 13년 전 | 479 | ||
| 4361 |
크라이스트
|
13년 전 | 2122 | |
| 4360 | 13년 전 | 961 | ||
| 4359 | 13년 전 | 964 | ||
| 4358 |
|
13년 전 | 827 | |
| 4357 |
스마일라니
|
13년 전 | 874 | |
| 4356 | 13년 전 | 1137 | ||
| 4355 | 13년 전 | 1910 | ||
| 4354 | 13년 전 | 1057 | ||
| 4353 |
cookieyou
|
13년 전 | 1393 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기