Ctrl-z 후 대화식 모드로 다시 입력 원래 대화식 모드로

대화 형 모드 ( Octave , gnuplot , R 등) 에서 실수로 Control+ z를 누를 때가 있습니다. 프로그램이 일시 정지되고 터미널로 되돌아갑니다.

저장된 모든 변수와 함께 원래 대화식 모드로 다시 들어갈 수 있습니까?

재현하려면 :

~> octave
octave:1> a = [1:10];
octave:2> ^Z
[1]+  Stopped                 octave
~>

변수가 a정의 된 세션을 어떻게 복구 할 수 있습니까?



답변

입력 fg하고 enter터미널을 누르십시오 .

   fg [jobspec]
          Resume jobspec in the foreground, and make
          it  the  current  job.   If jobspec is not
          present, the shell’s notion of the current
          job  is used.  The return value is that of
          the command placed into the foreground, or
          failure  if  run  when job control is dis-
          abled  or,  when  run  with  job   control
          enabled,  if  jobspec  does  not specify a
          valid job or jobspec specifies a job  that
          was started without job control.

답변

다음을 입력하여 작업을 다시 포 그라운드로 당기십시오.

fg

작업을 일시 중지했기 때문에 볼 수없는 동안 아무것도하지 않는 것입니다. 실제로 백그라운드에서 작업을 실행하도록 할 수도 있습니다 (를 입력하여 bg). 자세한 정보는 작업 제어 를 참조하십시오.


답변

fg포 그라운드 활동을 다시 가져 오는 데 사용할 수 있습니다.

또는

bg현재 활동을 배경으로 이동하는 데 사용할 수 있습니다 .