- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Partial Files ?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2004 01:55 AM
тАО06-17-2004 01:55 AM
I use scripts to process a pile of files in a directory. I have been doing this on off hours when no one is around. I need to increase the frequency that it is run and will need to run it during business hours.
The senario goes like this. A Pc user w/ a samba connection to the hp-ux machine drops a file into the directory(INBOX). The script on the hp-ux machine is run via cron and moves the accumulated files out the the INBOX.
Could I end up moving a file before it is fully written to the INBOX and end up w/ a partial file? There must be a protection in place against this. Just need to confirm.
Thanks,
Mike B
Solved! Go to Solution.
- Tags:
- samba
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2004 02:04 AM
тАО06-17-2004 02:04 AM
SolutionWhen you "mv" a file to another location on the same filesystem, the file doesn't change at all and, in fact, doesn't actually move anywhere. If the file is being written to when you "mv" it, it will still be being written to after the "mv".
There are two scenarios where you might hit a problem. Firstly, if your target directory for the INBOX files is on another fileystem then "mv" is just a "cp"+"rm" and then you will lose data from unfinished files.
Also, if, when files are written, the application closes the file and later re-opens it to append data, then, again you run the risk of copying half a file.
I would do some tests but my guess is that you will be OK.
However, if unsure then just play safe.
- Tags:
- mv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2004 02:09 AM
тАО06-17-2004 02:09 AM
Re: Partial Files ?
You can also compare the size of the file on Windows to that on the hp-ux
Anil
- Tags:
- lsof
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2004 03:11 AM
тАО06-17-2004 03:11 AM
Re: Partial Files ?
That makes me more comfortable.
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2004 03:28 AM
тАО06-17-2004 03:28 AM
Re: Partial Files ?
>>>>The senario goes like this. A Pc user w/ a samba connection to the hp-ux machine drops a file into the directory(INBOX).
How are the files dropped off into "INBOX"? Does the user manually do it or does some application do it?
>>>>The script on the hp-ux machine is run via cron and moves the accumulated files out the the INBOX.
If an application does it, then have the application drop the file off, then have it drop off a file name with a suffix of "RDY" - change your cron script to look for "RDY" suffixes only.
If it is a user manual file movement to "INBOX", then change your script to use "lsof" on the file to make sure no one has it open. lsof: http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.70/
live free or die
harry