LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 04-20-2009, 07:06 AM   #1
netweblogic
LQ Newbie
 
Registered: Aug 2008
Posts: 11

Rep: Reputation: 1
Moving files remotely w/o keeping ssh window open


Hi,

I'd like to move a file from one remote server to another. Exact method isn't really an issue as long as it's secure.

I have done scp ... for smaller files, but I have one huge file of over 30Gb that I want to leave transferring and be able to close my terminal windows, but be able to log in and check once in a while to see how it's progressing.

Can anyone inform me of the best way to do this?

Thanks
 
Old 04-20-2009, 07:27 AM   #2
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
You can try screen. You can run scp in a screen session, then detach from the terminal using Ctrl-A + d and reattach to the session using screen -r session_id. An example:
Code:
$ screen
<now you are in a screen session>
$ scp user@host:file .
<now type Ctrl-A then D>
<you return to your shell session>
$ screen -ls
There is a screen on:
        7871.pts-2.hostname      (Detached)
1 Socket in /var/run/screen/S-colucix.
$ screen -r 7871.pts-2.hostname
<you return to the screen session and see the progress of the scp command>
You can even close your terminal, logout, go home and reattach to the screen session remotely!
 
Old 04-20-2009, 07:28 AM   #3
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Edit: sorry, I was too late. Tried to post about GNU Screen, but there it went already..
 
Old 04-21-2009, 04:17 AM   #4
netweblogic
LQ Newbie
 
Registered: Aug 2008
Posts: 11

Original Poster
Rep: Reputation: 1
Thanks

Quote:
Originally Posted by colucix View Post
You can try screen. You can run scp in a screen session, then detach from the terminal using Ctrl-A + d and reattach to the session using screen -r session_id. An example:
Code:
$ screen
<now you are in a screen session>
$ scp user@host:file .
<now type Ctrl-A then D>
<you return to your shell session>
$ screen -ls
There is a screen on:
        7871.pts-2.hostname      (Detached)
1 Socket in /var/run/screen/S-colucix.
$ screen -r 7871.pts-2.hostname
<you return to the screen session and see the progress of the scp command>
You can even close your terminal, logout, go home and reattach to the screen session remotely!
Thanks a lot. This did the trick perfectly!
 
  


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
OpenGL desktop... keeping a window below others in X The_Nerd Programming 2 12-29-2008 03:36 PM
Keeping owner info when moving a directory linuxfia Linux - General 4 08-14-2008 11:12 AM
open files in the same window for File Management in RedHat lordofring Linux - Software 0 03-20-2006 09:35 PM
Accessing X Window remotely depam Linux - Software 3 03-11-2006 01:44 PM
keeping the terminal window open NNP Linux - General 1 09-01-2005 11:08 PM

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

All times are GMT -5. The time now is 02:25 AM.

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