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
 
gvfs-move(1)							   User Commands						      gvfs-move(1)

NAME
gvfs-move - move a file from one VFS location to another SYNOPSIS
gvfs-move source-URI destination-URI DESCRIPTION
gvfs-move moves a file from one URI location to another, using the virtual file system. OPERANDS
The following operands are supported: source-URI Specifies the source file location in standard URI format. destination-URI Specifies the destination file or directory location in standard URI format. EXAMPLES
Example 1: Moving a File From a Web Server to a Local File example% gvfs-move http://www.sun.com file:///home/user/index.html ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables: NLSPATH. EXIT STATUS
The exit value 0 is returned regardless of success or failure. FILES
The following files are used by this application: /usr/bin/gvfs-move Executable to move a file from one VFS location to another ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-gvfs | +-----------------------------+-----------------------------+ |Interface stability |Volatile | +-----------------------------+-----------------------------+ SEE ALSO
gvfs-cat(1), gvfs-copy(1), gvfs-rename(1), gvfs-info(1), gvfs-less(1), gvfs-ls(1), gvfs-mkdir(1) gvfs-monitor-dir(1), gvfs-monitor-file(1), gvfs-mount(1), gvfs-copy(1), gvfs-open(1), gvfs-rm(1), gvfs-save(1), gvfs-trash(1), gvfs-tree(1), attributes(5), environ(5) NOTES
Written by Alvaro Lopez Ortega, Sun Microsystems Inc., 2008. SunOS 5.11 25 Mar 2008 gvfs-move(1)
All times are GMT -4. The time now is 07:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy