본문 바로가기

카테고리 없음

터미널 명령어 (ctrl + c, &, ps -ef |grep)

vim test.js하고선 우분투에서 빠져나가버렸다...?

다시 돌아가기 위해선  control+C 하면 됨

 

In many command-line interface environments, control+C is used to abort the current task and regain user control. ... It is a special sequence that causes the operating system to send a signal to the active program.

 

여기서 307230는 프로세스 아이디

프로세스는 프로그램이라고 보면 됨

 

 

 

& 입력하면 현재 back단에서 돌고있는 프로세스 확인 할 수 있음

Ampersand Operator (&)
The function of '&' is to make the command run in background. Just type the command followed with a white space and '&'. You can execute more than one command in the background, in a single go.

 

ps -ef | grep processname

means: look for lines containing processname in a detailed overview/snapshot of all current processes, and display those lines

-e and -f are options to the ps command, and pipes take the output of one command and pass it as the input to another. Here is a full breakdown of this command:

 

  • ps - list processes
  • -e - show all processes, not just those belonging to the user
  • -f - show processes in full format (more detailed than default)
  • command 1 | command 2 - pass output of command 1 as input to command 2
  • grep find lines containing a pattern
  • processname - the pattern for grep to search for in the output of ps -ef
 

What does "ps -ef|grep processname" mean?

I want to know exactly what this particular command ps -ef|grep processname means and how it works. I know that this should be associated with processname which we want to search for, but I don'...

askubuntu.com

 

307230 프로세스를 kill 하고서 다시 확인해보니

목록에 없는 걸 볼 수 있음