<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Partial Files ? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/partial-files/m-p/3308032#M715948</link>
    <description>Yes you could but it probably doesn't matter.  &lt;BR /&gt; &lt;BR /&gt;When 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".  &lt;BR /&gt; &lt;BR /&gt;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.&lt;BR /&gt; &lt;BR /&gt;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.&lt;BR /&gt; &lt;BR /&gt;I would do some tests but my guess is that you will be OK.&lt;BR /&gt; &lt;BR /&gt;However, if unsure then just play safe.</description>
    <pubDate>Thu, 17 Jun 2004 09:04:35 GMT</pubDate>
    <dc:creator>Mark Grant</dc:creator>
    <dc:date>2004-06-17T09:04:35Z</dc:date>
    <item>
      <title>Partial Files ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/partial-files/m-p/3308031#M715947</link>
      <description>&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Mike B</description>
      <pubDate>Thu, 17 Jun 2004 08:55:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/partial-files/m-p/3308031#M715947</guid>
      <dc:creator>mike boswell_3</dc:creator>
      <dc:date>2004-06-17T08:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: Partial Files ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/partial-files/m-p/3308032#M715948</link>
      <description>Yes you could but it probably doesn't matter.  &lt;BR /&gt; &lt;BR /&gt;When 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".  &lt;BR /&gt; &lt;BR /&gt;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.&lt;BR /&gt; &lt;BR /&gt;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.&lt;BR /&gt; &lt;BR /&gt;I would do some tests but my guess is that you will be OK.&lt;BR /&gt; &lt;BR /&gt;However, if unsure then just play safe.</description>
      <pubDate>Thu, 17 Jun 2004 09:04:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/partial-files/m-p/3308032#M715948</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-06-17T09:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: Partial Files ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/partial-files/m-p/3308033#M715949</link>
      <description>On each file you can do fuser/lsof to know, if it is being used by a process or not.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You can also compare the size of the file on Windows to that on the hp-ux&lt;BR /&gt;&lt;BR /&gt;Anil</description>
      <pubDate>Thu, 17 Jun 2004 09:09:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/partial-files/m-p/3308033#M715949</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2004-06-17T09:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: Partial Files ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/partial-files/m-p/3308034#M715950</link>
      <description>Thanks,&lt;BR /&gt;That makes me more comfortable.&lt;BR /&gt;Mike</description>
      <pubDate>Thu, 17 Jun 2004 10:11:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/partial-files/m-p/3308034#M715950</guid>
      <dc:creator>mike boswell_3</dc:creator>
      <dc:date>2004-06-17T10:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: Partial Files ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/partial-files/m-p/3308035#M715951</link>
      <description>Mike,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;The senario goes like this. A Pc user w/ a samba connection to the hp-ux machine drops a file into the directory(INBOX). &lt;BR /&gt;&lt;BR /&gt;How are the files dropped off into "INBOX"? Does the user manually do it or does some application do it?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;The script on the hp-ux machine is run via cron and moves the accumulated files out the the INBOX.&lt;BR /&gt;&lt;BR /&gt; 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. &lt;BR /&gt;&lt;BR /&gt;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: &lt;A href="http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.70/" target="_blank"&gt;http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.70/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Jun 2004 10:28:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/partial-files/m-p/3308035#M715951</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2004-06-17T10:28:01Z</dc:date>
    </item>
  </channel>
</rss>

