Networking Forums

Networking Forums > Computer Networking > Linux Networking > Locking a file temporarily (till the file is transferred completely).

Reply
Thread Tools Display Modes

Locking a file temporarily (till the file is transferred completely).

 
 
Lince M Lawrence
Guest
Posts: n/a

 
      11-09-2004, 11:58 AM
I am working in a Linux-Macintosh Network. And I transfer numerous
files to Macintosh from Linux. I am having a problem while doing so.
We have created a watch-folder in Macintosh for PDF conversion
(distilling ps to pdf), which checks the specified folder for the
presence of files every 180 seconds. If I am transferring a relatively
big file at the 175th second, (and it would take another 60 seconds to
get transferred completely) the active watch folder will pick the
incomplete file for distilling, ending up with a corrupt PDF.

Somebody please help me by suggesting a method (command) to lock/block
a file from further operation till it is transferred completely. The
user may be transferring a file either by ncftp or ssh from Linux to
Macintosh, and he can unlock/de-block the file when the transfer is
complete; which eventually enables the watch-folder to identify the
file.

Hope my requirement is clear.

Thanks,
Lince M Lawrence
 
Reply With Quote
 
 
 
 
HisNameWasRobertPaulson
Guest
Posts: n/a

 
      11-09-2004, 03:07 PM
Interesting. Perhaps you can go about it this way:

1) Have the users upload to a certain directory, then (once the file is on
the local server) move the file to this so-called watch directory. A move
from the same hard disk will be much quicker, avoiding the distiller process
mucking things up. - Although most ftp servers (out-of-the-box) allow
commands such as mv to be envoked - this is a bit cumbersome for the
uploader.

A more streamlined way would be to employ a web server that serves up a cgi
page... perl can do the following:

1) provide a web interface to submit files via http, then execute this
distiller process and output the file all in one perl script. That would be
pretty slick. There are plenty of perl examples out there for doing this
sort of thing. This way, you can get rid of this cron job, or whatever it is
you have running in opt for an on-demand sort of execution, all via a web
browser, as far as the uploader is concerned. This would be a bit more work,
but I can't think of a cooler way to do it...



"Lince M Lawrence" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) m...
> I am working in a Linux-Macintosh Network. And I transfer numerous
> files to Macintosh from Linux. I am having a problem while doing so.
> We have created a watch-folder in Macintosh for PDF conversion
> (distilling ps to pdf), which checks the specified folder for the
> presence of files every 180 seconds. If I am transferring a relatively
> big file at the 175th second, (and it would take another 60 seconds to
> get transferred completely) the active watch folder will pick the
> incomplete file for distilling, ending up with a corrupt PDF.
>
> Somebody please help me by suggesting a method (command) to lock/block
> a file from further operation till it is transferred completely. The
> user may be transferring a file either by ncftp or ssh from Linux to
> Macintosh, and he can unlock/de-block the file when the transfer is
> complete; which eventually enables the watch-folder to identify the
> file.
>
> Hope my requirement is clear.
>
> Thanks,
> Lince M Lawrence



 
Reply With Quote
 
Lince M Lawrence
Guest
Posts: n/a

 
      11-10-2004, 01:15 AM
"HisNameWasRobertPaulson" <kalis_anon_REMOVE_@hotmail.com> wrote in message news:<4190eb34$0$91011$(E-Mail Removed) >...

> Interesting. Perhaps you can go about it this way:


> 1) Have the users upload to a certain directory, then (once the file is on
> the local server) move the file to this so-called watch directory. A move
> from the same hard disk will be much quicker, avoiding the distiller process
> mucking things up. - Although most ftp servers (out-of-the-box) allow
> commands such as mv to be envoked - this is a bit cumbersome for the
> uploader.


This is what we do now. I was looking for an alternative

> A more streamlined way would be to employ a web server that serves up a cgi
> page... perl can do the following:


> 1) provide a web interface to submit files via http, then execute this
> distiller process and output the file all in one perl script. That would be
> pretty slick. There are plenty of perl examples out there for doing this
> sort of thing. This way, you can get rid of this cron job, or whatever it is
> you have running in opt for an on-demand sort of execution, all via a web
> browser, as far as the uploader is concerned. This would be a bit more work,
> but I can't think of a cooler way to do it...


Thanks, I will try with this one.

Lince M Lawrence
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
File Copy Windows -> SMB Linux; File size problem Publishers Press Windows Networking 0 10-23-2008 06:05 PM
How to know if a web page/file is downloaded completely Sonny Linux Networking 0 11-15-2007 04:34 AM
Rinominare File con data attraverso un file Batch Daytan Windows Networking 1 09-18-2007 05:40 PM
Saving text file on SMB share - file has changed James Telford Linux Networking 3 09-18-2007 10:12 AM
Login Script - a log file overwritten by echo %var% >> file john Windows Networking 0 02-27-2004 09:36 PM



1 2 3 4 5 6 7 8 9 10 11