Linux basic commands
pushd [OPTIONS] [DIRECTORY] : directory stack에다 하나씩 넣어준다. 추후에 pushd +3 같은 것을 통해 스택의 3번째 디렉토리로 이동이 가능하다.
popd [OPTIONS] : directory stack에서 하나씩 제거한다.
which [OPTIONS] FILE_NAME... : 특정 명령어(파일,저 FILE_NAME parameter) 의 위치를 찾아주는 명령어이다.
readlink [OPTIONS]... FILE... : symbolic link 가 있으면 그 링크의 원래 path를 알려준다.
cpio 굉장히많은 옵션 : copy in copy out 의 줄임말로 .tar ,.cpio 를 처리한다.
gzip [Options] [filenames] : zip 과 gzip은 비슷하지만 앵간하면 gzip 이 좋다고 나와있다.
xz [Options]... [file]... : best compression tool 이지만 잘 안쓴다고 나와있다.?
zstd [OPTIONS] [-|INPUT-FILE] [-o OUTPUT-FILE] : 가장 좋은 lossless compression tool 이다.
jobs : current terminal window 의 jobs 상태를 보여준다.
fg [job_spec] : background job to foreground /// bg 는 backgorund 상태에서 running으로 바뀜
fg는 키보드와 연결되어 있다.
제어터미널 == 사용자의 제어 (키보드) // 한 마디로 2개의 터미널중에 실제로 키보드 입력을 받고있는 터미널을 fore ground process 라고 하고 이놈이 control terminal 을 가지고 있는것이다.
pts/#: UNIX98 Pseudo terminal system
tty# : console terminal
top : dynamic real-time view of the running system을 보여준다.
kill SIGNAL PID : 주어진 프로세스pid에 주어진 signal을 보낸다.
SIGKILL 은 프로세스가 거절할 수 없는 시그널이라서 중간에 파일안에 무엇을 적고있고 버퍼에 적을게 남아있어도 마저 처리못하고 바로 종료해버린다. 나머지는 프로레스가 거절할수도있고 종료하더라도 뒷 마무리를 하고 종료를 하게된다.
SIGTERM이 default다.
pgrep [OPTIONS] pattern : just like grep command but process version
reference = Learn Pgrep and Pkill Command with Examples in Linux (linuxtechi.com)
strace : debugging tool , powerful process monitoring , instruction tool
ncat , nc : similar to cat command but for network.
reference = 10 useful ncat (nc) Command Examples for Linux Systems (linuxtechi.com)
curl [OPTIONS] [URL...] : command to transfer data to or from server
wget [OPTIONS] [URL] : download files from the server
1. even when the user has not logged on to the system
2.work in the background without hindering the process
free [OPTIONS] : displays the total amount of free space available along with the amount of memory used and swap memory in the system also buffer used by kernel
ps [OPTIONS] : view information related with the processes on a system. "Process Status"
Pipe : 란 IPC(inter process communciation)의 일종으로 채널이다. 단뱡향 통신이다. e.g) A|B|C == A의 stdout 과 B의 stdin을 연결해주고 B의 stdout 을 C의 stdin과 연결 해주는것
hard link는 regular file만 가능하지만 sybolic link는 모든 것을 다 가르 킬 수 있다.
'자율주행 > 김선영님의 리눅스 강의' 카테고리의 다른 글
리눅스 day6(bash) (0) | 2020.12.14 |
---|---|
리눅스 day5 (file sytem) (0) | 2020.12.11 |
리눅스 day4 (network) (0) | 2020.12.10 |
리눅스 day3 (Vim) (0) | 2020.12.09 |
리눅스 Day 1 (0) | 2020.12.07 |