LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 05-06-2005, 12:08 PM   #1
faezeh
LQ Newbie
 
Registered: Mar 2005
Posts: 19

Rep: Reputation: 0
"&" after a command in commandline


hello,

I read that by typing "&" after a command in the commandline,this process runs in the background so it doesnot make the bash busy running it and you still have your commandline to type more commands,but when I typed "vim a.cpp & " and then enter,I was given [1] and 3909 ,what do
these numbers mean,and how is "a.cpp" running on my system?

Thanks
 
Old 05-06-2005, 12:19 PM   #2
rstewart
Member
 
Registered: Feb 2005
Location: Sunnyvale, CA
Distribution: Ubuntu
Posts: 205

Rep: Reputation: 38
Hello,

LOL What you basically did was to tell the shell to run the vim editor on the file "a.cpp" and to run the session in the background. Since running something in background detaches the screen and keyboard from the running process, you basically had an editing session running with no I/O on the file. (BTW: This is a useful thing to do if you want to momentarily postpone your editing of a source file to check something else out and want a full blown shell to do it in.)

The [1] indicated that it was the first process running in background for your shell, and the 3909 was the process ID assigned to the process.

To get the edit session "reattached" to the screen and keyboard you can type "fg". This instructs the shell to bring the currently running background process back into the foreground.
 
Old 05-07-2005, 10:05 PM   #3
faezeh
LQ Newbie
 
Registered: Mar 2005
Posts: 19

Original Poster
Rep: Reputation: 0
hi again,
can you instruct me on the meaning of running a process in the background and foreground.

Thanks
 
Old 05-07-2005, 10:28 PM   #4
kencaz
Senior Member
 
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 48
This may help a little>>>

http://faculty-staff.ou.edu/R/Thomas...ix/process.htm

KC
 
  


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
Shell Script: Find "Word" Run "Command" granatica Linux - Software 5 07-25-2007 07:42 AM
Tiny Sofa 2.0 - I thought "halt", "reboot" were only root command ?? sorcerer Linux - Distributions 1 08-21-2004 03:28 PM
Does "ac97 & RH8" imply "buy a Sound Blaster Live"? nicktoop Linux - Hardware 3 02-13-2004 08:53 AM
"segmentation error" when issuing "useradd" command through terminal with RH 9.0 kaihuang Linux - General 0 10-21-2003 11:47 PM
Recover files after "rm" command on ext2 & fat32 pixelV Linux - Hardware 0 07-14-2003 05:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

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