Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wonder, if FTP reserves full space and creates the file at once when trasfer starts or the target file is created only when upload is finished.

For example: I have a server sending a file via FTP to another server, where I have a script that processes files in specified directory that is running via cron every 5 minutes. Script uses directory listing to find the files, so here I need to be sure that the file is transfered completely before executing.

share|improve this question
    
This likely depends on what FTP server you are using. A temp file would have to be created to act like a cache for the upload. – Ramhound Feb 7 '14 at 13:40
    
The files are transfered from linux to windows(Win Server) – Vit Kos Feb 7 '14 at 13:47
    
My comment was in reference to the ftp server software itself. – Ramhound Feb 7 '14 at 14:50
up vote 3 down vote accepted

It really depends on the ftp server you are using indeed as somebody already mentioned. But all the servers I saw usually do start directly writing to the disk so you should see immediately the file as soon as you start sending it. This way also if the connection gets interrupted you end up with a partial file (which eventually you can resume later)

Given your needs I'd suggest that you yourself send the file to a temporary name or directory on the server that are not matched by the program on the server and then rename it when you see the upload is finished.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .