Process - Back Ground, Fore Ground

모든 프로세스는 백그라운드(back ground)또는 포그라운드(fore ground)라는 두가지 중 하나의 모드로 작동한다.

리눅스의 모든 프로세스는 전면부라고 하는 포그라운드 작업후면부라고 하는 백그라운드 작업 중 하나의 상태로 실행된다우리가 일반적으로 실행시키는 거의 모든 명령어는 포그라운드로 실행된다하지만 명령어 뒤에 "&"문자를 붙이게 될경우 백그라운드로 실행된다또한 몇몇 프로세스는 자동으로 백그라운드로 실행되기도 한다.

그리고 bg명령어와 fg명령어,jobs라는 명령어는 이러한 프로세스들의 foreground작업과 background작업에 관한 설정과 확인을 하는 명령어이다.


- Reference

http://blog.naver.com/PostView.nhn?blogId=dudwo567890&logNo=130156852012

  1. vi editor로 해당 파일을 열고
  2. 라인 번호를 입력 후 (혹시 입력모드로 들어와 있다면 ESC 키 입력 후 라인 번호 입력)
  3. SHIFT+G 입력
  4. 입력한 라인 번호로 이동완료


- Reference

http://tosnam.tumblr.com/post/33149534054/linuxvi-editor%EC%97%90%EC%84%9C-%ED%8A%B9%EC%A0%95-%EB%9D%BC%EC%9D%B8-%EB%B2%88%ED%98%B8%EB%A1%9C-%EC%9D%B4%EB%8F%99%ED%95%98%EA%B8%B0






Rsync

Rsync(Remoe Sync)는 원격에 있는 파일과 디렉토리를 복사하고 동기화 하기 위해서 사용하는 툴이며 동시에 네트워크 프로토콜이다. 리눅스와 유닉스에서는 백업용도로 (아마도)가장 널리 사용하는 툴일 것이다(윈도우와 애플에도 포팅됐다). Rsync는 CLI툴로, 커맨드 라인의 옵션들을 이용해서 배치 프로그램을 개발하기 쉬다는 장점이 있다. 이 스크립트를 cron 등에 올리는 걸로 간단하게 백업 혹은 미러(mirror) 시스템을 구축할 수 있다.


https://www.joinc.co.kr/w/Site/Tip/Rsync

  • jobs - list the current jobs
  • fg - resume the job that's next in the queue
  • fg %[number] - resume job [number]
  • bg - Push the next job in the queue into the background
  • bg %[number] - Push the job [number] into the background
  • kill %[number] - Kill the job numbered [number]
  • kill -[signal] %[number] - Send the signal [signal] to job number [number]
  • disown %[number] - disown the process(no more terminal will be owner), so command will be alive even after closing the terminal.


- Reference

https://superuser.com/questions/268230/how-can-i-resume-a-stopped-job-in-linux

+ Recent posts