Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 03-07-2012, 10:26 AM   #1
Senior Member
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
How start an action when a file has been transferred

I have a ftp-server with several user-accounts. When a user sends in a file via ftp, the file is to be immediately and automatically sent to other servers.
Question is, what kind of trigger is there, that I could use to get an action/shell script running immediately after a file has been ftp:d to this server?
(I could of course create a cronjob that checks for files in specific locations, every 5 minutes or so, but it's not my preferred way.)
So, to be clear:
User logs in via ftp -> user sends file -> file storage on server is complete !TRIGGER!
Old 03-07-2012, 10:44 AM   #2
Senior Member
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Hi pingu

try with "inotify" here and here

This will be just a starting point.

Last edited by lithos; 03-07-2012 at 10:49 AM.
1 members found this post helpful.
Old 03-07-2012, 11:57 AM   #3
Senior Member
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Original Poster
Rep: Reputation: 127Reputation: 127
Thanks a lot lithos, that seems to be exactly what I'm looking for!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] File transferred by FTP not taking UMASK settings. mufy AIX 5 05-22-2014 05:59 AM
How to write kernel log directly to a file without user action? 10110111 Linux - General 5 04-23-2009 08:29 PM
What is the best action to take if you delete a file and want to recover it? baldurpet Linux - Desktop 10 02-18-2009 02:58 PM
file monitoring + take action tek1024 Linux - Software 3 11-18-2004 06:41 PM
Changing the default open action for an executable file nitrambass Member Intro 1 06-22-2004 03:09 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:04 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration