LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-13-2011, 05:57 PM   #1
mansour
Member
 
Registered: Nov 2010
Location: Toronto, Canada
Distribution: Ubuntu 10.04 Lucid Lynx - Ubuntu 10.10 notebook - Debian 5.08 - Win XP
Posts: 172

Rep: Reputation: 2
How do I install jobs command and its manual on ubuntu 10.10 notebook


Hello:


I just found out that jobs -l and man jobs produce no output in my terminal. I wonder how could I fix that?
How could I install jobs command and its manual on my ubuntu 10.10 ?

Thank you


mansour

Last edited by mansour; 04-13-2011 at 06:07 PM.
 
Old 04-13-2011, 06:08 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
If jobs -l gives you no output it means that there are no jobs running in the background.
Also, you will find no manpage for jobs, because it is an built-in command of the shell.
It is not possible to re-install jobs. To test if it works, just execute a command, for example vim, and put it to the background with Ctrl+z. Now you can list this backgrouded job with jobs -l.
 
1 members found this post helpful.
Old 04-13-2011, 06:12 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
*

Google .. man jobs ..
will show http://www.computerhope.com/unix/ujobs.htm#01
 
Old 04-13-2011, 06:19 PM   #4
mansour
Member
 
Registered: Nov 2010
Location: Toronto, Canada
Distribution: Ubuntu 10.04 Lucid Lynx - Ubuntu 10.10 notebook - Debian 5.08 - Win XP
Posts: 172

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by TobiSGD View Post
If jobs -l gives you no output it means that there are no jobs running in the background.
Also, you will find no manpage for jobs, because it is an built-in command of the shell.
It is not possible to re-install jobs. To test if it works, just execute a command, for example vim, and put it to the background with Ctrl+z. Now you can list this backgrouded job with jobs -l.

Thank you very much for the useful info.
I am learning something new here.
OK, I have a simple script that is a counter, counting to 30 sleeping 1 sec in between numbers, I run it to the background using & after it.

How would I bring this script to the foreground again using jobs command?


mansour
 
Old 04-13-2011, 06:51 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
You wouldn't use jobs for that, you would use the fg command for that.
In Ubuntu the standard shell is Bash, you may want to have a look at the reference manual, in your cases especially the chapter about job control.
 
1 members found this post helpful.
Old 04-13-2011, 09:37 PM   #6
mansour
Member
 
Registered: Nov 2010
Location: Toronto, Canada
Distribution: Ubuntu 10.04 Lucid Lynx - Ubuntu 10.10 notebook - Debian 5.08 - Win XP
Posts: 172

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by TobiSGD View Post
You wouldn't use jobs for that, you would use the fg command for that.
In Ubuntu the standard shell is Bash, you may want to have a look at the reference manual, in your cases especially the chapter about job control.

OK, last question about jobs.
why is it that I am getting no output for any of these commands on my terminal?


mansour@ubuntu-notebook:~$ jobs -l
mansour@ubuntu-notebook:~$ jobs -n
mansour@ubuntu-notebook:~$ jobs
mansour@ubuntu-notebook:~$ jobs -p
mansour@ubuntu-notebook:~$ jobs -r
mansour@ubuntu-notebook:~$ jobs -s
mansour@ubuntu-notebook:~$

sure there are lots of jobs running in the background.


mansour
 
Old 04-14-2011, 06:46 AM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
Any of your commands will only show processes that run in the background and were started in that specific terminal. It will not show other processes. If you are interested in that, have a look at the ps command.
If you are interested in more command line stuff, I would recommend to read one of the many tutorials out there, like RUTE.
 
1 members found this post helpful.
Old 04-14-2011, 08:54 AM   #8
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
Quote:
Originally Posted by mansour View Post
OK, last question about jobs.
why is it that I am getting no output for any of these commands on my terminal?


mansour@ubuntu-notebook:~$ jobs -l
mansour@ubuntu-notebook:~$ jobs -n
mansour@ubuntu-notebook:~$ jobs
mansour@ubuntu-notebook:~$ jobs -p
mansour@ubuntu-notebook:~$ jobs -r
mansour@ubuntu-notebook:~$ jobs -s
mansour@ubuntu-notebook:~$

sure there are lots of jobs running in the background.


mansour
Processes and bash jobs are completely different things. A job is a process started in bash that's put into the background (that is, it doesn't block baash from accepting more commands, but it still belongs to this bash session).

jobs only lists background processes from this session, and also bash is not the only way processes are started. Any program can launch child processes.
 
1 members found this post helpful.
Old 04-14-2011, 10:44 PM   #9
mansour
Member
 
Registered: Nov 2010
Location: Toronto, Canada
Distribution: Ubuntu 10.04 Lucid Lynx - Ubuntu 10.10 notebook - Debian 5.08 - Win XP
Posts: 172

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by TobiSGD View Post
Any of your commands will only show processes that run in the background and were started in that specific terminal. It will not show other processes. If you are interested in that, have a look at the ps command.
If you are interested in more command line stuff, I would recommend to read one of the many tutorials out there, like RUTE.


Thank you very much.
I will.

mansour
 
Old 04-14-2011, 10:45 PM   #10
mansour
Member
 
Registered: Nov 2010
Location: Toronto, Canada
Distribution: Ubuntu 10.04 Lucid Lynx - Ubuntu 10.10 notebook - Debian 5.08 - Win XP
Posts: 172

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by MTK358 View Post
Processes and bash jobs are completely different things. A job is a process started in bash that's put into the background (that is, it doesn't block baash from accepting more commands, but it still belongs to this bash session).

jobs only lists background processes from this session, and also bash is not the only way processes are started. Any program can launch child processes.


Thank you very much
Very useful info.



mansour
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I am failing to install ubuntu 10.04 desktop on ASUS notebook M5200N mansour Linux - Newbie 3 02-17-2011 01:14 PM
HP Notebook, VISTA, wireless DSL. UBUNTU "Unable to resolve host notebook" uncledunc Linux - Laptop and Netbook 7 02-03-2009 01:19 PM
May I install a 64 bit ubuntu on my notebook? riverplate Linux - Laptop and Netbook 2 06-24-2007 12:37 PM
winxp reinstall w/grub manual install on ubuntu causes missing hal.dll file for xp pulper Linux - Software 6 09-13-2006 03:26 PM
I can`t install ubuntu on my notebook Borland Ubuntu 3 04-03-2006 01:24 AM


All times are GMT -5. The time now is 01:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration