General discussion

  • Creator
    Topic
  • #2308773

    UNIX FTP

    Locked

    by jerzy_milosiewicz ·

    How do I check in UNIX, if an FTP process has finished output data to a file before I grab that file for the further process?

All Comments

  • Author
    Replies
    • #3480156

      UNIX FTP

      by cpfeiffe ·

      In reply to UNIX FTP

      On the box that is receiving the file you can use ps to print the current processes that are running. You should see an in.ftpd process for the ftp connection from the sending server. Once that process is gone the session is complete and you can start using the file.

    • #3453540

      UNIX FTP

      by cmorris ·

      In reply to UNIX FTP

      Note that it is possible for the ftp process to finish without correctly copying the file. If you can check the file size on the remote site you could compare it with the local copy. Some sites provide an additional file with a verification signature. If so, run a virification program locally and see if it is a match.

      Sometime, you could just see if the file size is growing keeping in mind that the data is probably being buffered by the system so you won’t see file size changing every time some data is transmitted.

      Hope this helps

    • #3478803

      UNIX FTP

      by unixadmin ·

      In reply to UNIX FTP

      If you have lsof installed on the unix server you can use lsof to determine if the file is being utilized by another application. lsof | grep If you do’t have lsof installed I would suggest getting it installed, because it is an invaluable troubleshooting tool.

    • #3391254

      UNIX FTP

      by dnastudios ·

      In reply to UNIX FTP

      Send the data you want followed by an empty file.
      e.g. sending abc.txt of 10000 bytes
      put abc.txt
      !touch /tmp/abc.chk
      put /tmp/abc.chk abc.chk

      Only access tha abc.txt file when the abc.chk file has been received.

      Note that ftp does not guarantee complete and correct transfer of the data from one system to another.

      Best regards,

      David

    • #3455327

      UNIX FTP

      by jerzy_milosiewicz ·

      In reply to UNIX FTP

      This question was auto closed due to inactivity

Viewing 4 reply threads