ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I have many processes running that printf local debug. (they will log to file later!)
I start them by
( sleep 20000000 | fp ) &
else they get killed/stop by themselves.
So now its running in the background, I want to bring it to the front to see the printfs.
# pgrep fp
# fg 3301
-bash: fg: 3301: no such job
Why no such job?!
How do I use it?
Resume jobspec in the foreground, and make it the cur-
rent 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 disabled 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.
What is jobspec?
Click here to see the post LQ members have rated as the most helpful post in this thread.
There seems to be an important distinction between "jobs" in the current shell and "processes" in the session. "ps" and "kill" can be used to look at and chnage the states of processes in the session (e.g. "kill -CONT $PID" to bring a suspended process back to life). "jobs" and "fg" can only be used for jobs in the current shell.