본문 바로가기

TIL/OS & Linux5

MIT 6.828 - 1. Lab 01: Xv6 and Unix utilities - xargs 코드 및 해석 MIT 6.828 - 1. Lab 01: Xv6 and Unix utilities - xargs 문제 (Problems) xargs (moderate) Write a simple version of the UNIX xargs program: its arguments describe a command to run, it reads lines from the standard input, and it runs the command for each line, appending the line to the command's arguments. Your solution should be in the file user/xargs.c. The following example illustrates xarg's behav.. 2022. 11. 5.
MIT 6.828 - 1. Lab 01: Xv6 and Unix utilities - find 코드 및 해석 MIT 6.828 - 1. Lab 01: Xv6 and Unix utilities - find 문제 (Problems) find (moderate) Write a simple version of the UNIX find program: find all the files in a directory tree with a specific name. Your solution should be in the file user/find.c. Some hints: Look at user/ls.c to see how to read directories. Use recursion to allow find to descend into sub-directories. Don't recurse into "." and "..". .. 2022. 11. 5.
MIT 6.828 - 1. Lab 01: Xv6 and Unix utilities - pingpong 코드 및 해석 MIT 6.828 - 1. Lab 01: Xv6 and Unix utilities - pingpong 문제 (Problems) pingpong (easy) Write a program that uses UNIX system calls to ''ping-pong'' a byte between two processes over a pair of pipes, one for each direction. The parent should send a byte to the child; the child should print ": received ping", where is its process ID, write the byte on the pipe to the parent, and exit; the parent s.. 2022. 11. 5.
MIT 6.828 - 1. Lab 01: Xv6 and Unix utilities - sleep 코드 및 해석 MIT 6.828 - 1. Lab 01: Xv6 and Unix utilities - sleep 문제 (Problems) sleep (easy) Implement the UNIX program sleep for xv6; your sleep should pause for a user-specified number of ticks. A tick is a notion of time defined by the xv6 kernel, namely the time between two interrupts from the timer chip. Your solution should be in the file user/sleep.c. Some hints: Before you start coding, read Chapter.. 2022. 11. 5.
[Linux] 리눅스 기본 명령어 모음 / 자주 쓰는 리눅스 명령어 정리 리눅스 명령어 디렉터리 이동 **ls** |디렉터리의 컨텐츠 리스팅 **cd** 디렉터리 바꾸기 **pwd** 현재 실행 중인 디렉터리 ***** 와일드 카드 **?** 와일드 카드 0 or 1개 캐릭터 **.** 현재 디렉터리 **..** 디렉터리 한 단계 위 **~** 홈 디렉터리 **-** 이전 디렉터리 디렉터리 및 파일 수정 **mkdir** 새로운 빈 디렉터리 생성 **rmdir** 빈 디렉터리 제거 **mv** 파일 이동 **cp** 파일 복제 **rm**파일 삭제 **chmod** 파일 permision 변경 터미널에 파일 보여주기 **less** 터미널 window에 파일 보여주기 **cat** 파일 합치기 **head** 첫 10줄 보여주기 **tail** 마지막 10줄 보여주기 검색 *.. 2022. 9. 21.