Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Ensure FTP is complete before using file Post 55246 by GMMike on Tuesday 7th of September 2004 09:05:18 AM
Old 09-07-2004
Ensure FTP is complete before using file

Hi,
I have a program that checks a directory for new files. A file may be placed in the directory only via FTP from another system.

The files are long, the FTP can take several minutes to complete.

my program sences that a file has arrived but can't tell if the FTP process that sent it is complete or not.

In other words, my program can't tell if the file is being written to or not.

Is there a UNIX command that I can use either in ksh or C that would tell me if a file is being used by another process?


Thanks.
ekareem
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Ensure the file completion ?

Hi, I would like to copy a file from one location to another. But that particular file is not fully loaded. I like to copy a file once it's fully loaded or complete file. How to ensure whether file is fully loaded or complete file?. -Thambi (5 Replies)
Discussion started by: thambi
5 Replies

2. Shell Programming and Scripting

script to ensure lines are in sequence

Hello there, I check files containing more than 2000 lines, I try to make sure that the lines are in sequence...for example the first line begins with Av567, second line contains Av568 and so on up to the last line that may contain Av2500. I need a script to check that all lines are in sequence... (5 Replies)
Discussion started by: docaia
5 Replies

3. UNIX for Dummies Questions & Answers

BASH complete-filename & menu-complete together

Hi, Does anyone know how to make BASH provide a list of possible completions on the first tab, and then start cycling through the possibilites on the next tab? Right now this is what I have in my .bashrc: bind "set show-all-if-ambiguous on" bind \\C-o:menu-complete This allows... (0 Replies)
Discussion started by: Mithu
0 Replies

4. IP Networking

A test to ensure TCP/IP configuration is complete

Greetings. I have Debian lenny, and at the moment only the bare bones install, no GUI. I'm connecting via wireless to a Linksys router on a home network, and I manually configured a fixed ip etc during the install. I have not attempted to use any higher level apps such as ftp or telnet or apt yet.... (3 Replies)
Discussion started by: fguy
3 Replies

5. Shell Programming and Scripting

Checking for FTP complete

Hi, I have a situation where I'm downloading multiple files from a remote system and I need to start a process after all the files are downloaded completely. How can I achieve it. Eg. I have 6 files, file1, file2, file3.... file6. I need to start a script scrpt1 after all the files have... (4 Replies)
Discussion started by: bornon2303
4 Replies

6. AIX

How to ensure mksysb backup completed successfully.

Hi All, I want to know, how we can ensure that mksysb backup completed successfully and is restorable. I know one way my command lsmksysb -B but I found that one mksysb who has not backedup all the files was also showing in this command output, so that doesn't ensure its integrity and... (1 Reply)
Discussion started by: falgun6666
1 Replies

7. Shell Programming and Scripting

Ensure file copy is complete before starting process

Hi experts, I have a requirement wherein a user is uploading a file to the Landing directory on one of our Linux servers. A cron job is scheduled to run after every 5 minutes which will pick up the files from the source (Landing) dir and copy to the target dir, and once successfully copied to... (4 Replies)
Discussion started by: adi_2_chaos
4 Replies

8. Programming

Ensure C++ will work on a Unix system

For my one college course, my professor said that we have to ensure that the C++ code we send him will work on a Unix system. I in turn installed Cygwin on my Windows 7 machine, and have been using that to compile and check my code, but it sounds like Cygwin is still compiling the code for my... (2 Replies)
Discussion started by: davidp007
2 Replies

9. Shell Programming and Scripting

How to ensure a script can only be invoked from another?

Hi All, I have two scripts - ScriptA and ScriptB ScriptA has logic to invoke ScriptB : - with some parameter - or without any parameter ScriptB can also be invoked by the user from the command line. Is there anyway to ensure that when I execute ScriptB from the command line, it does... (3 Replies)
Discussion started by: chaitanya.gvc
3 Replies
ftpconfig(1M)						  System Administration Commands					     ftpconfig(1M)

NAME
ftpconfig - set up anonymous FTP SYNOPSIS
ftpconfig [ftpdir] ftpconfig -d ftpdir DESCRIPTION
The ftpconfig script is executed by the super user to set up anonymous FTP. Anonymous FTP allows users to remotely log on to the FTP server by specifying the user name ftp or anonymous and the user's email address as password. The anonymous users are logged on to the FTP Server and given access to a restricted file area with its own file system root. See chroot(2). The FTP area has its own minimal system files. This command will copy and set up all the components needed to operate an anonymous FTP server, including creating the ftp user account, creating device nodes, copying /usr/lib files, and copying timezone data. The passwd and group files set up have been stripped down to prevent malicious users from finding login names on the server. The anonymous file area will be placed under ftpdir. If the ftp user account already exists, then the current FTP area is used, and the system files in it are updated. All other files are left untouched. This command should be run to update the anonymous FTP area's configuration whenever a system patch is installed, or the system is upgraded. OPTIONS
-d Create a new or update an existing ftpdir without creating or updating the ftp user account. Use this option when creating guest FTP user accounts. OPERANDS
The following operands are supported: ftpdir The absolute pathname of the directory under which the anonymous FTP area is set up. EXIT STATUS
The following exit values are returned: 0 Successful completion 1 Improper usage of the command 2 Command failed ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWftpu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
ftpaddhost(1M), in.ftpd(1M), useradd(1M), chroot(2), attributes(5) SunOS 5.11 1 May 2003 ftpconfig(1M)
All times are GMT -4. The time now is 09:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy