Development

Basic file system calls: open, read, write 1. open open 함수를 사용하면 "/aa/bb"라는 file을 read-write가 가능하도록 open 한다. open 함수는 file descriptor라고 부르는 고유 번호를 return 한다. file descriptor 0 (standard input) 1 (standard output) 2 (standard error) 아래 예제에서 x는 file descriptor를 받는다. file descriptor의 범위가 0부터 2까지이기 때문에 x는 3 미만일 것이다. x = open("/aa/bb", O_RDWR, 00777); or char fname[20]; strcpy(fname, "/aa/bb"); x = o..
Running a C program in Linux Commands gcc : C program을 컴파일한다. gcc -o ex1 ex1.c "ex1.c"을 컴파일하고, “ex1”이라는 실행파일 object를 생성한다. -o 옵션으로 executable file name을 지정할 수 있다. "ex1"이라는 실행파일을 사용하려면 ./ex1 명령어 사용 gcc –S ex1.c compile을 하지만, assemble 하지 않는다. assembly language file인 "ex1.s"를 생성한다. g++ : C++ program 을 컴파일한다. g++ -o ex1 ex1.cpp kill : process에게 신호를 보낸다. kill 1234 pid가 "1234"인 process를 kill한다. ^c : 현..
VI vi x.c : edit file "x.c" 1) mode vi는 3가지의 모드가 있다. command mode 커서 이동 (cursor moving), 삭제 (deleting), 복사 (copying) input mode 삽입 (insertion) status-line mode other tasks 2) In the beginning we are at command mode. 처음 vi를 실행하면 command mode로 진행된다. command mode: 커서 이동 (cursor moving) : j(down), k(up), h(left), l(right) 삭제 (deletion) : x(delete one character), dd(delete a line) copy and paste: 3yy..
Linux command classification 명령어 모음집은 아래 참고 [Linux] 기본 명령어 모음 Basic Linux Commands (A-Z 순) 참고 https://github.com/oneonlee/Computer-Science/blob/main/4.%20System%20Programming/01.%20Basic%20Linux%20Commands/README.md GitHub - oneonlee/Computer-Science: Intro.. oneonlee.tistory.com display information general: man process: ps, who, finger, top, last, history file: location: find, which, whereis, l..
file tree / : root directory bin : executable files ls, zip, cat, chown, df, du, env, ftp, grep, ... etc : system configuration files password (password file), hostname (the name of this server), … home : user home directories linuxer2 (home for user linuxer2), park(home for user park), … usr : library files, header files lib (library files are here), include (header files are here), …
relative path, absolute path (상대경로, 절대경로) If the path starts with /, it is an absolute path; otherwise it is a relative path. cd /home/linuxer1/12345 -- go to /home/linuxer1/12345 cd 12345 -- go to directory 12345 in the current directory if the current location is /home/linuxer1, go to /home/linuxer1/12345 if the current location is /bin go to /bin/12345 If the destination directory does not ex..
special symbols . : current directory cp f1 ./f2 -- copy f1 to f2 in the current directory .. : parent directory cp f1 ../f2 -- copy f1 to f2 in the parent directory > : standard output redirection cat f1 > f3 -- display the content of f1 in f3 (same effect as “cp f1 f3”) | : pipe. redirect the standard output of the first program into the standard input of the second program cat f1 | more * : m..
https://www.toptal.com/developers/gitignore gitignore.io Create useful .gitignore files for your project www.toptal.com 일일이 작성하기 귀찮은 .gitignore를 자동으로 만들어주는 사이트를 추천한다. 이렇게 사용자가 원하는 운영 체제, 개발 환경(IDE) 등을 입력하면 ​이렇게 raw 형식으로 .gitignore를 만들어준다. 생성된 .gitignore의 예시는 다음과 같다. # Created by https://www.toptal.com/developers/gitignore/api/macos,python,pycharm,visualstudiocode # Edit at https://www.toptal.com..
Basic Linux Commands (A-Z 순) 참고 GitHub - oneonlee/Computer-Science: Introduction to Computer Science Introduction to Computer Science. Contribute to oneonlee/Computer-Science development by creating an account on GitHub. github.com GNU/Linux Command-Line Tools Summary GNU/Linux Command-Line Tools Summary Gareth Anderson Chris Karakas - Conversion from LyX to DocBook SGML, Index generation Revisi..
PyCharm으로 새로운 프로젝트를 만들고, 기껏 PyCharm 내부 터미널에서 pip 명령어로 패키지들을 설치하고, Jupyter Notebook을 실행하여 모듈들을 import하였더니 ModuleNotFoundError가 발생했다. 아래의 블로그에 힘을 빌려 해결하였다. https://parkaparka.tistory.com/28 Jupyter Notebook - python 경로, pip module 인식 못함 Jupyter Notebook을 맨처음에 사용하다 보면 python의 경로 혹은 다른 문제 때문에 아래 사진처럼 분면 pip를 통해서 install 했음에도 python shell에서는 import 할수 있음에도 불구하고 설치한 모듈(ex) pandas. parkaparka.tistory.c..
oneonlee
'Development' 카테고리의 글 목록 (2 Page)