Linux 中的 fg 命令及示例
linux 中的fg命令用于将后台作业置于前台。
句法:
fg [job_spec]
job_spec可能是:
%n
: Refer to job number n.%str
: Refer to a job which was started by a command beginning with str.%?str
: Refer to a job which was started by a command containing str.%% or %+
: Refer to the current job. fg and bg will operate on this job if no job_spec is given.%-
: Refer to the previous job.
fg
命令的选项:
- fg [JOB_SPEC] :此命令用于将提到的在后台运行的作业置于前台。
“sleep 500”是一个命令,用于创建一个运行 500 秒的虚拟作业。 - fg –help :显示帮助信息。