LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-14-2011, 02:02 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,520

Rep: Reputation: 51
Command line terminated by ampersand. How do I put it in the foreground?


Hi:

I know a program running in the background can be brought to the foreground by typing 'fg'. So, if

command_line &

really runs the program in the background, my question has just been answered. But then all reduces to this question (yeah, I know; but I'm asking in earnest): does the ampersand sign make the program run in the background? Thanks.
 
Old 06-14-2011, 02:12 PM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
Hi,

Yes it does, but that is not the complete story about backgrounding. Have a look at this article: Job Control

Hope this helps.
 
Old 06-14-2011, 02:17 PM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,520

Original Poster
Rep: Reputation: 51
It looks very promising. Thank you, druuna.
 
Old 06-14-2011, 02:21 PM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
Quote:
Originally Posted by stf92 View Post
It looks very promising. Thank you, druuna.
You're welcome
 
  


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
How to put in one line this sed command? xpto09 Linux - Newbie 5 09-13-2009 02:05 PM
[SOLVED] Put a process in foreground with his PID gagou7 Linux - Newbie 2 09-02-2009 04:17 AM
Scripting: How to put wget in foreground? klss Linux - Software 7 01-13-2009 05:53 PM
trying to output only first line of command out put dave247 Debian 2 11-03-2008 05:36 PM
Put a date/time from the command line Jzarecta Linux - Software 1 10-03-2007 01:48 PM


All times are GMT -5. The time now is 07:03 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