Sponsored Content
Top Forums UNIX for Advanced & Expert Users Issue with IN_CLOSE_WRITE Event Of incrond Post 302886048 by Ariean on Wednesday 29th of January 2014 12:49:56 PM
Old 01-29-2014
Quote:
Originally Posted by Corona688
Have the uploader move the file to its final location when its done uploading. Make the two folders on the same partition. That way, complete files will appear in the folder with no intermediate state.
Uploader/Client can put a file in one location, i have to come up with the script to move the file to a different directory. But since the file system event is triggered/ing even before the file has been completely transfered, i can't move the file as it will move only partial file? isn't it. please correct me if i am wrong.

For Example:
In the below script move_to_directory if i put a line to move the file, it will move only partial file

Code:
/var/sftp/home/aac IN_CLOSE_WRITE move_to_directory

mv folder1/file1 folder2/file1
 
incron.conf(5)						       incron documentation						    incron.conf(5)

NAME
/etc/incron.conf - main config file for inotify cron (incron) DESCRIPTION
The file /etc/incron.conf contains default settings for the program incrond. Each line holds a single value pair in the form option = value. Comment lines must have a hash sign (#) in the first line. The valid configuration options are: system_table_dir This directory is examined by incrond for system table files. Default:/etc/incron.d user_table_dir This directory is examined by incrond for user table files. Default:/var/spool/incron allowed_users This file contains users allowed to use incron. Default:/etc/incron.allow denied_users This file contains users denied to use incron. Default:/etc/incron.deny lockfile_dir This directory is used for creating a lock avoiding to run multiple instances of incrond. Default:/var/run lockfile_name This name (appended by '.pid') is used for creating a lock avoiding to run multiple instances of incrond. Default:incrond editor This name or path is used to run as an editor for editing incron tables. Default no editor is given, system editor used, this option overide this. SEE ALSO
incrond(8), incrontab(1), incrontab(5) AUTHOR
Lukas Jelinek <lukas@aiken.cz> (please report bugs to http://bts.aiken.cz or <bugs@aiken.cz>). COPYING
This program is free software. It can be used, redistributed and/or modified under the terms of the GNU General Public License, version 2. Lukas Jelinek 0.5.10 incron.conf(5)
All times are GMT -4. The time now is 11:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy