ftp command line without overwrite?
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.
Related videos on Youtube
Admin
Updated on September 17, 2022Comments
-
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.
-
DaveParillo over 14 yearsCould be a bit more specific? transfer what?
-
Arjan over 14 yearsSee "FTP software that checks data diffs?" at superuser.com/questions/68411/… and "Syncronizing files over FTP" at superuser.com/questions/33856/syncronizing-files-over-ftp
-
-
Admin over 14 yearsI 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 over 14 yearsThat's quite an odd (or creative) use of wget. How would one use that?
-
Admin over 14 yearswould i need a wput ;). The machine on the other send (ftp host) is a windows while this one is a mac.
-
CarlF over 14 yearsArjan, "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 over 14 yearsWget for the win! I'm up-voting this one.