Presentation is loading. Please wait.

Presentation is loading. Please wait.

4. 셸을 이용한 명령어 입력. Unix 시스템 쉘 간단한 셸 명령 명령 매개변수(Command arguments)

Similar presentations


Presentation on theme: "4. 셸을 이용한 명령어 입력. Unix 시스템 쉘 간단한 셸 명령 명령 매개변수(Command arguments)"— Presentation transcript:

1 4. 셸을 이용한 명령어 입력. Unix 시스템 쉘 간단한 셸 명령 명령 매개변수(Command arguments)
Bourne Shell(Steven Bourne, AT&T) sh $ .login 프로그래밍 기능 C Shell(Bill Joy, Berkeley) csh % .cshrc Bourne shell + 대화형 명령입력 별명(alias) history Korn Shell(Dave Korn) ksh Bourne shell + C shell 간단한 셸 명령 $ pwd ; ls (;로 명령 분리) 명령 매개변수(Command arguments) $ ls -l xx 백그라운드 프로세스 $ xx & $ ps (program status)로 확인 $ fg (foreground 작업으로) $ bg (background 작업으로) 표준 입출력 GUI 프로그램 X 윈도우 환경 화면 입출력 모델 프로그램 termcap vi 텔레타이프 모델 프로그램 C 입출력 라이브러리 Unix 시스템

2 4. 셸을 이용한 명령어 입력.. 출력 재지정(Output Redirection)
$ ps > xx $ cat xx 출력 재지정 추가(Appending Output Redirection) $ ps >> ps.logfile = $ ps > temp1 $ cat ps.logfile temp1 > temp2 mv temp2 ps.logfile rm temp1 표준 에러 재지정 $ ls -z 2> msgfile 입력 재지정 쉘 : 표준 입력으로 명령 입력 $ cat whoops who ps $ sh < whoops ? 파이프(Pipes) 한 프로그램의 출력을 다른 프로그램의 입력으로 연결 $ ls /home/kc > tempfile $wc -l tempfile 17 (현재 디렉토리가 /home/ks 경우) = $ ls /home/kc | wc -l 16 Unix 시스템

3 4. 셸을 이용한 명령어 입력... 만능 문자(Metacharacter)와 파일명 생성
* Matches any character string(null 포함) *.c ? Matches any single character ??.c [ Introduces a character class abc[aeiou] ] Terminates a character class - Indicates a character range in a character class def[0-9] [a-zA-Z] [*?]a-bc : 만능 문자 기능 상실 ch[0-15] (참고) 마침표(.)로 시작하는 파일들은 .* 로 /etc/*.c는 /etc 디렉토리 내의 .c 파일들 특수 문자의 무력화(Disabling Special Characters) 역슬래시(\)로 $ ls *\* (*로 끝나는 모든 파일) $ ls *\** (*가 들어가는 문든 파일) Unix 시스템

4 5. Unix 파일 시스템. 파일 파일 시스템 Unix 파일의 유형 보통 파일 디렉토리 파일
대용량 기억장치에 저장된 이름 붙여진 정보의 모임 파일 시스템 대용량 기억장치의 구성을 명시하는 조직적인 체제 I-node table 에 파일 정보 저장 Unix 파일의 유형 보통 파일(ordinary files) 디렉토리 파일(directory files) 장치 파일(device files) 기호 링크 파일(symbolic link files) 보통 파일 $ cat /etc/motd (텍스트로) $ od -x /bin/ls (8진 덤프) $ mv(move) : I-node 그대로, 그전 link 지우고 새 link $ cp(copy) : 새 I-node, 새 link $ ln(link) : I-node 그대로, 새 link $ rm(remove) 디렉토리 파일 홈디렉토리 : 로그인한 위치 $ pwd $ cd (홈디렉토리로) $ cd /bin Unix 시스템

5 5. Unix 파일 시스템.. 계층 파일 시스템(The Hierarchical File System)
/bin /usr /dev /etc /tmp /lib 경로명(Pathnames) . 현재 디렉토리 .. 부모 디렉토리 규칙 / 로 시작 / 로 구분 .. 포함 가능 파일 접근 모드(File Access Modes) rwx rwx rwx User Group Other 파일 소유자나 수퍼 유저가 권한 변경 $ chmod $ chown $ chgrp 디렉토리 접근 모드(Directory Access Modes) 읽기 : 디렉토리 파일 정보 open 가능 ls 가능 쓰기 : 디렉토리 안 파일 생성, 제거 가능 실행 : 디렉토리 검색 가능 cat /usr/bin/source/README Unix 시스템


Download ppt "4. 셸을 이용한 명령어 입력. Unix 시스템 쉘 간단한 셸 명령 명령 매개변수(Command arguments)"

Similar presentations


Ads by Google