Sponsored Content
Top Forums Shell Programming and Scripting How to make sure a file is uploaded in its entirety Post 302248507 by ph0enix on Friday 17th of October 2008 08:20:14 PM
Old 10-17-2008
Quote:
Originally Posted by jim mcnamara
lsof will allow you to see if another process has a given file open.
This is exactly what I needed. Thank you!
 

9 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Unable to open uploaded image

Hi, I am unable to view/open the image I uploded in one of the forums. https://www.unix.com/showthread.php?t=37793&page=2&pp=20 Please help. enc. (2 Replies)
Discussion started by: encrypted
2 Replies

2. UNIX for Advanced & Expert Users

automate backing up uploaded files

Hi, We are running FTP Server on UNIX (Solaris 9). Users login and upload (also download) files whenever required. Now, we have to automate the process which makes a copy of every file immediately after it gets uploaded to the FTP server (by any user). I've ruled out rsync,mirror,filesync... (2 Replies)
Discussion started by: prvnrk
2 Replies

3. Shell Programming and Scripting

Get Files from ftp which are uploaded recent week

Hi All, Here is a brief scenario for my requirement .. There is a directory in FTP Server, where would files be uploaded on weekly basic. I need to get those files which are uploaded during this week and not the files which are uploaded the previous week and download them to locale... (1 Reply)
Discussion started by: narramadan
1 Replies

4. Programming

makeutility: how to get the make-file name inside of the make-file?

How I can get the current make-file name in a make-file So, if I run make with specified file:make -f target.mak is it possible to have the 'target' inside of the that 'target.mak' from the file name? (2 Replies)
Discussion started by: alex_5161
2 Replies

5. UNIX and Linux Applications

PAssword protect uploaded files

Hi, Is it possible to make sure/test that all uploaded files to my FTP will be of .RAR format (that's easy) but also password protected? Thanks (0 Replies)
Discussion started by: saariko
0 Replies

6. Solaris

Multiple private key to be uploaded

I would like to ask if you have a procedure on how to upload multiple private key for multiple users in solaris? I was only able to add one but when I tried to add several key, it fails. example: a. user1: user1.ppk b. user2: user2.ppk Each with different password on the server. Pls advise (6 Replies)
Discussion started by: lhareigh890
6 Replies

7. Shell Programming and Scripting

i dont want to move files which are being uploaded 5 to 10 min ago

in /abc/jrd/ users are continuously uploading files memo*.txt i have created a memo.sh file in that i have written cd /abc/jrd/ mv memo*.txt /scripts/memo while files are being moved to this /scripts/memo users who are uploading new file are not getting fully copied i this path i want that... (0 Replies)
Discussion started by: rakesh_mumbai
0 Replies

8. UNIX for Advanced & Expert Users

i dont want files which are being uploaded 5 to 10 min ago.

i want to move files from A dir to B dir, say eg: mv *memo*.txt /scripts/memo/ but while doing this new files are being uploaded by users, i dont want files which are being uploaded 5 to 10 min ago. other wise even files which are being currently uploaded will get moved to /scripts/memo. (8 Replies)
Discussion started by: rakesh_mumbai
8 Replies

9. UNIX for Dummies Questions & Answers

File uploaded via FTP not visible from Command Line

I am using VSFTPD on amazon web services and have a remote service that uploads files to server via FTP. The files comes through fine and when I log in via FTP client I see them. The problem is the files are supposed to be moved once uploaded but the files are not visible via command line thus the... (2 Replies)
Discussion started by: theman0684
2 Replies
FTP_NB_FPUT(3)								 1							    FTP_NB_FPUT(3)

ftp_nb_fput - Stores a file from an open file to the FTP server (non-blocking)

SYNOPSIS
int ftp_nb_fput (resource $ftp_stream, string $remote_file, resource $handle, int $mode, [int $startpos]) DESCRIPTION
ftp_nb_fput(3) uploads the data from a file pointer to a remote file on the FTP server. The difference between this function and the ftp_fput(3) is that this function uploads the file asynchronously, so your program can per- form other operations while the file is being uploaded. PARAMETERS
o $ftp_stream - The link identifier of the FTP connection. o $remote_file - The remote file path. o $handle - An open file pointer on the local file. Reading stops at end of file. o $mode - The transfer mode. Must be either FTP_ASCII or FTP_BINARY. o $startpos -The position in the remote file to start uploading to. RETURN VALUES
Returns FTP_FAILED or FTP_FINISHED or FTP_MOREDATA. EXAMPLES
Example #1 ftp_nb_fput(3) example <?php $file = 'index.php'; $fp = fopen($file, 'r'); $conn_id = ftp_connect($ftp_server); $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); // Initate the upload $ret = ftp_nb_fput($conn_id, $file, $fp, FTP_BINARY); while ($ret == FTP_MOREDATA) { // Do whatever you want echo "."; // Continue upload... $ret = ftp_nb_continue($conn_id); } if ($ret != FTP_FINISHED) { echo "There was an error uploading the file..."; exit(1); } fclose($fp); ?> SEE ALSO
ftp_nb_put(3), ftp_nb_continue(3), ftp_put(3), ftp_fput(3). PHP Documentation Group FTP_NB_FPUT(3)
All times are GMT -4. The time now is 09:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy