본문 바로가기

반응형

History

리눅스 history 명령어 history 명령어 Bash History 설정 cat /etc/profile ## history export HISTSIZE=10000 export HISTTIMEFORMAT='%Y-%m-%d %H:%M:%S ' #export HISTCONTROL=erasedups EOF Print ‘n’ Lines history 2 $ history 2 919 2021-01-28 21:20:43 echo "history command" 920 2021-01-28 21:20:59 history 2 Repeat Specific Command !번호 $ !917 echo "history command" history command Repeat Most Recent Command !! $ !! echo "history c.. 더보기
history 명령어 history 명령어 history 명령어는 리눅스 및 Unix 기반 시스템에서 사용자의 명령어 실행 기록을 확인하는데 사용됩니다. 이 명령은 사용자가 터미널에서 실행한 명령어 목록을 표시하며, 기본적으로 최근에 실행한 명령어부터 순서대로 나열됩니다. history 명령어를 사용하는 방법과 몇 가지 유용한 옵션 1. 기본 사용법 history 명령어는 다음과 같이 간단히 사용할 수 있습니다. history 이 명령을 실행하면 사용자의 명령어 실행 기록이 순차적으로 나열됩니다. 2. 특정 개수의 명령어 표시 history 명령어에 -n 옵션을 사용하여 최근 N개의 명령어를 표시할 수 있습니다. 예를 들어, 최근 10개의 명령어를 표시하려면 다음과 같이 입력합니다. history -n 10 3. 특정 범위의.. 더보기
history 명령어 실행 시간 보기(history HISTTIMEFORMAT) history 명령어 실행 시간 보기(history HISTTIMEFORMAT) history HISTTIMEFORMAT 환경 변수 설정 export HISTTIMEFORMAT='%Y-%m-%d %H:%M:%S ' $ history 328 2012-03-11 07:45:48 vi /etc/profile 329 2012-03-11 07:45:55 source /etc/profile 330 2012-03-11 07:45:57 history history unset (HISTTIMEFORMAT) unset HISTTIMEFORMAT $ history 66 exit 67 ls 68 history profile(/etc/profile)에 환경 변수 등록 vim /etc/profile ### history HIST.. 더보기

728x90
반응형