标签:
dengwo@dengwo-ThinkPad-Edge-E530:~$ audacious & [1] 3308 #运行了播放器,但终端可以继续敲命令.. dengwo@dengwo-ThinkPad-Edge-E530:/$ vim shishi.txt [2]+ Stopped vim shishi.txt #用记事本编辑一个文本, 后carl+z, 暂停回到终端.. dengwo@dengwo-ThinkPad-Edge-E530:/$ okular ^Z [3]+ Stopped okular #同上, 打开一个阅读器,回到终端, 后carl+z, 暂停回到终端.. dengwo@dengwo-ThinkPad-Edge-E530:/$ jobs -l [1] 3308 Running audacious & (wd: ~) [2]- 3321 Stopped vim shishi.txt [3]+ 3339 Stopped okular #查看运行的程序, 只有[1]在播放音乐,[2,3]暂停中...要显示[1,2,3]任意一个, 命令+排行, 注意[3]加号,表示命令默认执行. dengwo@dengwo-ThinkPad-Edge-E530:/$ fg 1 audacious (wd: ~) ^Z [1]+ Stopped audacious (wd: ~) (wd now: /) #回到播放器, 并暂停播放.. dengwo@dengwo-ThinkPad-Edge-E530:/$ jobs -l [1]+ 3308 Stopped audacious (wd: ~) [2] 3321 Stopped vim shishi.txt [3]- 3339 Stopped okular #从新查看, 现在播放器也暂停了.. dengwo@dengwo-ThinkPad-Edge-E530:/$ kill 3339 dengwo@dengwo-ThinkPad-Edge-E530:/$ jobs -l [1]+ 3308 Stopped audacious (wd: ~) [2] 3321 Stopped vim shishi.txt [3]- 3339 Stopped okular dengwo@dengwo-ThinkPad-Edge-E530:/$ #关闭阅读器, 后从新查看, 但是依然显示,(*我也不知道为什么.可能是桌面跟终端分离太大吧) 但是把阅读器调出来时它就终止..如下: dengwo@dengwo-ThinkPad-Edge-E530:/$ fg 3 okular Terminated dengwo@dengwo-ThinkPad-Edge-E530:/$ jobs -l [1]+ 3308 Stopped audacious (wd: ~) [2] 3321 Stopped vim shishi.txt #执行 fg 3 时任务栏的tab就消失了.. dengwo@dengwo-ThinkPad-Edge-E530:/$ bg 1 [1]+ audacious & (wd: ~) #从新播放音乐, 不影响终端继续 命令, 类似 程序 & 方式启动. dengwo@dengwo-ThinkPad-Edge-E530:/$ jobs -l [1]- 3308 Running audacious & (wd: ~) [2]+ 3321 Stopped vim shishi.txt dengwo@dengwo-ThinkPad-Edge-E530:/$ fg 2
#从新查看, 命令fg 2, 便可以继续写记事本了..音乐依然播放,(注:音乐播放器打开时是要鼠标点播放列表的,或回车一下默认上次歌曲..)
标签:
原文地址:http://my.oschina.net/dengwo/blog/469232