Carambola Dev
Shell 본문
교수님께서 주신 자료에 있는 shell에 대한 글 정리
https://www.cs.princeton.edu/courses/archive/spr05/cos126/cmd-prompt.html
Isn't case sensitive.
javac: To compile java program, ex) javac HelloWorld.java
java: To run a successfully compiled java program
more: Display the contents of a file one screenful at a time, use spacebar to skip through pages
dir: To view the contents of a directory
move + filename + directory name: Move a file to a directory
move + original filename + file name that I want to change: Changing a file name
copy + file that I want to copy + future filename
del + filename: Deletes a file
grep [options] pattern [files]: 파일에 찾고자 하는 문자열이 있는지 확인
find: 해당 문자열 담고 있는 파일 찾기
whereis: 명령/프로그램 위치 찾기
리디렉션 :입력 또는 출력을 키보드/모니터가 아니라 파일로 연결
ls –l > out (ls –l 의 결과를 out 라는 파일로 보낸다)
ls –l 2> error (ls –l 의 결과중 오류가 있으면 error 파일에 담는다)
ls –l > out 2> error (출력 결과는 out에, 오류 내용은 error 에 담는다)
alias: 기존의 복잡한 명령을 간단한 별명으로 대체하여 사용
alias ll=‘ls –alF’ 라고 정의한 후에는 ll 이라는 명령으로 사용 가능
히스토리 : 이전에 사용한 명령을 다시 불러 사용
!! 직전에 사용한 명령 다시 사용
!번호 : 번호에 해당하는 명령 다시 사용
ps :프로세스의 목록을 표시
ps –ef (상세 정보)
특정 프로세스 찾기: ps –ef | grep bash (bash를 프로세스 목록에서 찾기)
'Computer Science' 카테고리의 다른 글
| access denied for user 'root'@localhost' 에러 (0) | 2021.01.04 |
|---|---|
| ubuntu 서버 하나에서 dev/prod 서버 따로 구축하기 (0) | 2020.08.30 |
| 깃 & 깃허브 도서 요약 (0) | 2020.03.14 |
| IntelliJ 노트 (0) | 2020.03.13 |
| 파이썬 노트 (0) | 2020.01.18 |