Move a command to background.
Hello.
I like to move a command to background and I found "bg" and "fg" commands but I like when I move command to background then its running and not show me the result suddenly when its finished. For exmaple: Code:
$ sudo nmap -A IP Thank you. |
Quote:
Code:
sudo nmap -A IP & To use bg and fg you need to run the process, then CRTL-Z to stop the process and regain control, then bg will push it into the background. fg would recover it to the foreground. Easier to just start it in the background if that is your intent (or use screen). All of this information and more is readily available at dozens of sites online. a search with duckduckgo, google, bing, or evn yahoo search would turn up tutorials and references. |
Once a command is started in the foreground you have to pause it with Ctrl-Z,
then you can continue it with bg (or fg) command. |
OP asking: "NOT show me the result suddenly when its finished"
set +m
https://superuser.com/questions/3059...inishes-execut That's for just the "done" msg; redirecting output > is a different beast. Web-researching is always best, but coming up with just the right keywords is the trick!!! |
I do not really understand what do you want to do with your command if you do not want to see the result.
By default nmap scans the net and reports the result. If you suppress the result you will lost it. You ought to read about redirection to save the output (see man bash). (or probably I misunderstood something?) |
Quote:
Code:
$ sudo nmap -A |
#1 ping has no output until it ends. If you used
Code:
ping -c 3 google.com & The best case is to use something like screen (I like to handle it with screenie) so my command is running in a different virtual terminal session and I can go look at the output at my leisure. Is there anything that prevents you from using such a solution? |
Quote:
|
Quote:
|
i think op really needs several terminal windows.
or if no gui, screen or tmux. |
Quote:
|
Quote:
You really should investigate screen and screenie. I think you will like them a LOT. |
Quote:
|
All times are GMT -5. The time now is 05:11 PM. |