Mailinglist Archive: opensuse (3166 mails)
| < Previous | Next > |
RE: [SLE] Linux (Bash?) Equivalent of OS/2 "Detach" and "Start"
- From: "Robt. Miller" <bobm@xxxxxxxxxxx>
- Date: Sun, 30 Mar 2003 09:15:11 -0500 (EST)
- Message-id: <Pine.LNX.4.33.0303300913550.1355-100000@xxxxxxxxxxx>
On Sun, 30 Mar 2003 Ted.Harding@xxxxxxxxxxxxxxxx wrote:
> This use of "&" in known in the Unix world as "putting a process
> in the background". There are two associated commands: "bg" and "fg"
> (see "help bg" and "help fg" if running the bash shell).
>
> If a job has been put in the background (e.g. by using "&") after
> the command (say):
>
> program1 &
>
> you will see a job-number in [...] and process-id as soon as your
> command-lie prompt returns, e.g.
>
> xterm &
> [1] 5314
>
> If you now did
>
> fg 1
>
> you would re-attach the program (in this case "xterm") to the
> command line (though in this case, where the program is "xterm",
> nothing interesting would happen, except that the command-line
> would no longer accept independent input). Often, typing Ctrl-Z at
> a program which is running in the foreground will put it in the
> background, liberating the command-line, with a message like
>
> [1]+ Stopped xterm
>
> It could then be brought back to the foreground with "fg 1".
Also of interest is the program screen.
--
(o<
//\ Powered by SuSE Linux
V_/_ Virusproof. Crashproof.
9:13am up 34 days, 12:16, 27 users, load average: 2.52, 1.75, 1.38
processes 21528243
> This use of "&" in known in the Unix world as "putting a process
> in the background". There are two associated commands: "bg" and "fg"
> (see "help bg" and "help fg" if running the bash shell).
>
> If a job has been put in the background (e.g. by using "&") after
> the command (say):
>
> program1 &
>
> you will see a job-number in [...] and process-id as soon as your
> command-lie prompt returns, e.g.
>
> xterm &
> [1] 5314
>
> If you now did
>
> fg 1
>
> you would re-attach the program (in this case "xterm") to the
> command line (though in this case, where the program is "xterm",
> nothing interesting would happen, except that the command-line
> would no longer accept independent input). Often, typing Ctrl-Z at
> a program which is running in the foreground will put it in the
> background, liberating the command-line, with a message like
>
> [1]+ Stopped xterm
>
> It could then be brought back to the foreground with "fg 1".
Also of interest is the program screen.
--
(o<
//\ Powered by SuSE Linux
V_/_ Virusproof. Crashproof.
9:13am up 34 days, 12:16, 27 users, load average: 2.52, 1.75, 1.38
processes 21528243
| < Previous | Next > |