Find the answer to your Linux question:
Results 1 to 4 of 4
Hi all, I want to scp some files from one server to the other, but I need NOT to overwrite the existing files. Is there a way to do so? ...
  1. #1
    Just Joined!
    Join Date
    Oct 2006
    Posts
    8

    SCP and overwriting

    Hi all,

    I want to scp some files from one server to the other, but I need NOT to overwrite the existing files. Is there a way to do so? Some CLI file manager that could do it (afaik, Midnight Commander can't)?

    I'm using this command on CentOS.

  2. #2
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,562
    The easiest way would be to simply rename the files when copying them over...

    Code:
    scp original.file remote_server@address:/path/of/directory/to/copy/to/copy_of_original.file
    Or, create a new directory to copy them over to.
    Last edited by Dapper Dan; 03-14-2008 at 12:29 PM.
    Linux Mint + IceWM Registered:#371367 New Members: click here

  3. #3
    Just Joined!
    Join Date
    Oct 2006
    Posts
    8
    No, I needed to copy a directory recursively, so this solution is not useful for me. But I have just found the 'rsync' command which does exactly what I wanted. Thanx, anyway

  4. #4
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,562
    Quote Originally Posted by zorglub76 View Post
    No, I needed to copy a directory recursively...
    Well... that's not what you said...

    Good luck.
    Linux Mint + IceWM Registered:#371367 New Members: click here

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...