Find the answer to your Linux question:
Results 1 to 2 of 2
Hello, a file is uploaded through a FTP server. Is there anyway I can find out whether entire file has been uploaded? For example, I can open that file for ...
  1. #1
    Just Joined!
    Join Date
    Jan 2008
    Posts
    19

    Check whether a file is in use

    Hello, a file is uploaded through a FTP server.
    Is there anyway I can find out whether entire file has been uploaded?
    For example, I can open that file for reading, if it returns error, it means the file upload hasnt been started yet.
    However, if the upload has started, how can I find out that the file has been uploaded? For example, by checking whether any process uses that file?
    There is no way I could know the filesize in advance.

    I consider that once the upload starts, it will be successfully finished. The connection is reliable but slow.

    I use C/C++.

    cheers, meereck

  2. #2
    Linux Newbie
    Join Date
    Jul 2008
    Posts
    181
    Yes, that is possible. Look at the code of "fuser" or "lsof".

Posting Permissions

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