Computer Science🖥️/System Programming
-
[week4]File I/OComputer Science🖥️/System Programming 2021. 12. 6. 10:53
1. What is File? Linux file은 byte의 나열이다. // kernel, HW partition 등 모두 file로 표현이 된다. All I/O devices 은 파일로 표현된다. - /dev/sda1 (hard disk partition) - /dev/tty2 (terminal) //ctrl + alt + F1~F7 (termianl 이동 단축키) 2. File Types 각 파일은 시스템 안에서의 역할을 가리키는 type을 갖고 있다. - Regular file: 임의의 데이터를 담는 파일 - Directory: 관련된 파일의 그룹을 만들어 가리키는 그룹의 index - Socket: another machine에서 프로세스로 소통하기 위해 필요한 것 1) Regular file ..
-
[week3] Shell script & MakefileComputer Science🖥️/System Programming 2021. 12. 6. 08:33
1. What is Shell? : user와 os 사이의 Interface program - window command prompt와 유사하다 - bash version: $/bin/bash -version (bash shell version 확인 명령어) 2. Redirection & Pipes (shell script를 위한 명령어) File descriptor(fd) : open file에 대한 식별 번호 - 프로세스가 file이나 device에 접근하기 위해 사용된다. - standard fd(0~2는 기본 설정) stdin(0): standard input // keyboard stdout(1): standard output //terminal stderr(2): standard error o..