肖鑫鑫

肖鑫鑫的分享

他的个人主页  他的分享

Pausing Commands

肖鑫鑫   2009年09月18日 星期五 16:10 | 0条评论

Ctrl-z

To pause a task in the terminal press Ctrl-z. That will free up the terminal for other tasks, while still running your other tasks in the background.

fg

If you have sent a program into the background with Ctrl-z, you can bring it back to the foreground with the fg command. If you have more than one program running in the background, you can put the number of the job after the command.

jobs

Typing jobs in the terminal will give you a list of all the programs running in the background:

 
  $ jobs
  
[1]- Stopped vim linux_seo_tools.html
[2]+ Stopped man iwlist

To restart my instance of vim in the above example, I would type fg 1 . To restart the man page, I would type fg 2 .

评论

我的评论:

发表评论

请 登录 后发表评论。还没有在Zeuux哲思注册吗?现在 注册 !

暂时没有评论

Zeuux © 2024

京ICP备05028076号