전체 글

싱싱한 자연어를 탐구합니다.
리눅스 원격 파일 전송 (업로드/다운로드) 원격접속을 하지 않은 로컬 PC 상태에서 아래 코드실행 Remote(원격지) → Local(로컬) $ scp [옵션] [원격지 유저명]@[원격지 IP]:[원본 경로] [로컬 PC에 복사할 경로] 예시 $ scp -pr root@192.168.123.456:../../linuxer1/swvader03.wav /Users/oneonlee/Desktop/ Local(로컬) → Remote(원격지) $ scp [옵션] [원본 경로] [원격지 유저명]@[원격지 IP]:[파일이 저장될 경로] 예시 $ scp -p /Users/oneonlee/Desktop/test.zip root@192.168.123.456:../../linuxer1/ 옵션 -p : 원본 파일의 변경 시간..
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), …
oneonlee
One Only