[Linux] clear, history, find, export, alias
2023. 3. 14. 17:55ㆍCS/Linux
- clear
- 터미널 창 내용 지우기
- history
- 최근순으로입력한 쉘 커맨드 출력
104 clear
105 ls
106 pwd
107 cd ..
108 ls
109 history
yoonho@DESKTOP-QJCBDQD:/home$
- find . -name [파일 이름]
- 파일, 디렉토리 검색
- .은 현재 디렉토리에서 검색
yoonho@DESKTOP-QJCBDQD:~/workspace$ find . -name test1.txt
./test1.txt
yoonho@DESKTOP-QJCBDQD:~/workspace$ find . -name test3.txt
yoonho@DESKTOP-QJCBDQD:~/workspace$
- export [환경 변수 이름]
- 환경 변수 설정
- 쉘 내에서 계속 저장하기 위해서는 .bashrc, .zshrc에 환경변수를 저장
- source ~/.bashrc or source ~/.zshrc로 리눅스 환경설정을 재 로그인하지 않고 즉시 적용 가능
yoonho@DESKTOP-QJCBDQD:~/workspace$ export environment="testpath"
yoonho@DESKTOP-QJCBDQD:~/workspace$ env
...
environment=testpath
...
- alias [별칭 이름]="[명령어]"
- 지정한 이름으로 별칭 설정
- alias 명령어로 모든 별칭 확인 가능
yoonho@DESKTOP-QJCBDQD:~/workspace$ alias his="history"
yoonho@DESKTOP-QJCBDQD:~/workspace$ his
...
127 alias
128 alias his="history"
129 his'CS > Linux' 카테고리의 다른 글
| [Linux] 파일의 특정 패턴 검색, 추출 (0) | 2023.03.21 |
|---|---|
| [Linux] 파일 출력, 정렬, 중복 행 제거 (0) | 2023.03.15 |
| [Linux] bash, sudo, 파일(폴더) 처리 (0) | 2023.03.13 |
| [Linux] VI 편집기 쉘 커맨드 (0) | 2023.03.08 |
| [Linux] 폴더 생성 & 디렉토리 디렉토리 확인 및 이동 (0) | 2023.03.07 |