ftp command line without overwrite?

6,890

Solution 1

In addition to the other answers posted, wget should do anything you require quite easily.

Solution 2

Between two Unix-based systems, why not just use rsync instead? It was written precisely to solve this problem.

Solution 3

The man page for ftp lists the sunique and runique FTP subcommands which toggle saving files with unique filenames, as a way of avoiding overwriting existing files:

ie, file.1 if file exists, file.2 if file.1 exists, etc.

These are ftp commands, not OS command-line options for ftp, but I think the .netrc file could be used to toggle sunique or runique from the default OFF state when ftp starts.

Share:
6,890

Related videos on Youtube

Admin
Author by

Admin

Updated on September 17, 2022

Comments

  • Admin
    Admin over 1 year

    I transfered 15gb over the network. I have aother 10 to go. How do i transfer via cmd line without overwriting existing files? I want to skip files so i dont store it again. I dont need unique names for this.

  • Admin
    Admin over 14 years
    I am not worry about overwriting, just writing the same file again when i dont need to (thus the skipping which i forgot to mention!). Can i use sunique to plainly skip a file? I am thinking i should wipe the remote folder and start clean early during the day.
  • Arjan
    Arjan over 14 years
    That's quite an odd (or creative) use of wget. How would one use that?
  • Admin
    Admin over 14 years
    would i need a wput ;). The machine on the other send (ftp host) is a windows while this one is a mac.
  • CarlF
    CarlF over 14 years
    Arjan, "wget --no-clobber -c sunsite.doc.ic.ac.uk/ls-lR.Z" will download all files from the FTP site at sunsite, while not clobbering local files. Acidzombie, there are wget binaries available for the Mac (install via Fink) and Windows (wget.addictivecode.org/FrequentlyAskedQuestions#download).
  • pbr
    pbr over 14 years
    Wget for the win! I'm up-voting this one.