LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-10-2009, 06:28 AM   #1
nima0102
Member
 
Registered: Nov 2006
Posts: 209

Rep: Reputation: 30
wget and scp in background


Hi
I want wget and scp to be run in background,because when I close that bash or tty,these running command is closed.
thanks for any help or guidance
 
Old 05-10-2009, 06:40 AM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
You can use GNU screen for these things.
 
Old 05-10-2009, 06:41 AM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
wget runs in background without problem. If you don't want the console messages, just redirect them to /dev/null:
Code:
wget http://something.htm 2> /dev/null &
scp may give some problems if you don't use public/private key authentication for passwordless login. In that case you can run it in foreground, enter the password when prompted and then put it in background using <Ctrl-Z> and bg.

If you run this command on a remote machine through ssh, you can add the nohup command at the beginning of the line, so that the program is immune to hang-up signals when you exit the session:
Code:
nohup wget http://something.htm 2> /dev/null &
 
Old 05-12-2009, 09:09 AM   #4
nima0102
Member
 
Registered: Nov 2006
Posts: 209

Original Poster
Rep: Reputation: 30
thanks for your attention and quick reply
 
  


Reply



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 do i pass a password to scp prior to running it in the background? keys disabled AlexDBA Programming 4 05-01-2009 12:05 PM
Background http/ftp downloader software wtihout GUI (wget wrapper). ErV Linux - Software 3 09-01-2008 04:43 PM
Make SCP run in background? Moonman Linux - Software 3 11-29-2007 07:46 AM
SCP as a background process Edmunds Linux - General 4 12-31-2006 12:20 PM
Slow scp & wget transfer rate in Fedora Cora 64 joey52 Linux - Networking 17 12-27-2004 01:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:07 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
Open Source Consulting | Domain Registration