Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

So, I am in this little predicament where I am stuck watching a few ftp folders to see if they have new files added to them. If they do, it needs to throw an event with the file name. Thereby telling something else to download that file.

This is a pretty simple object to make, I was just curious if anyone knew how expensive this operation would be?

I plan on using the command NLIST because I don't need file size information, and there will be no sub-directories in the folder. Each file in the folder will have exactly 25 characters in its name.

There could be anywhere from 10 to 'maybe' a couple thousand (max around 2000) files per folder (usually on the lower end, 100-300, but currently growing).

The files are anywhere from 250kb to a very VERY unlikely 10mb (usually within the 250kb to 4mb range).

There possibly could be up to a few hundred folders (in which case I could change the watch frequency depending on number of folders), but currently there are only a few (6-10ish).

There also would be multiple logins for the ftp server, different logins would have access to different folders.

I am not asking for an implementation, just if anyone has some first or second hand knowledge about FTP, how could this affect my network.

I am not opposed to putting in file retention times or change the frequency in which I check for new files.

share|improve this question
There will also only be 1 file per folder per day. – Meiscooldude Apr 7 '10 at 22:41
Easily solved programmatically. Perhaps you should take this to Stack Overflow. – John Gardeniers Apr 7 '10 at 23:34

Inotify tools:

inotifywait -e create -rmq $watch_directory | while read i; do
    file=$(echo $i | awk '{print$3}') 
    dir=$(echo $i | awk '{print$1}')
    # echo ${dir}${file}
share|improve this answer
+1 This is lightweight and easy to do. See the examples at for more information. – Richard Holloway Apr 8 '10 at 9:42

Assuming you have shell access to the FTP server, then dnotify is your friend. Directory change notification.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.