<?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: How to see the disk's fragment status or file's  fragment in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/how-to-see-the-disk-s-fragment-status-or-file-s-fragment/m-p/3796341#M9780</link>
    <description>&lt;!--!*#--&gt;For your entertainment...&lt;BR /&gt;On the DUMP/HEAD, and processing the data.&lt;BR /&gt;Here is some more playing with perl:&lt;BR /&gt;&lt;BR /&gt;One liner for 1 file, avoiding 2 temp files:&lt;BR /&gt;&lt;BR /&gt;$ pipe DUMP/HEAD/BLOC=COUNT=0 test.mai | perl -ne "$frag++ if /^\s+Count:/; print ""$frag fragments\n"" if eof"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Script with args globbed from command line:&lt;BR /&gt;-------------------------------&lt;BR /&gt;while ($file=shift @ARGV) {&lt;BR /&gt;  $frag = 0;&lt;BR /&gt;  foreach (`DUMP/HEAD/BLOC=COUNT=0 $file`) {&lt;BR /&gt;    $frag++ if /^\s+Count:/&lt;BR /&gt;    }&lt;BR /&gt;  print "$frag fragments in $file\n";&lt;BR /&gt;  }&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please note the the wildcard file expansion is done before the script runs. This is often helpful, but actually tricky to avoid. One has to protect the wildcards with strong (') or double-double quotes to stop the help, and later strip those.&lt;BR /&gt;&lt;BR /&gt;Script with args explicitly processed&lt;BR /&gt;-------------------------------&lt;BR /&gt;while ($files = shift @ARGV) {&lt;BR /&gt;# print "--$files\n"&lt;BR /&gt;  $files =~ s/"|'//g; # strip quotes&lt;BR /&gt;  while ( $file = glob $files ) {&lt;BR /&gt;    $frag = 0;&lt;BR /&gt;    foreach (`DUMP/HEAD/BLOC=COUNT=0 $file`) {&lt;BR /&gt;      $frag++ if /^\s+Count:/&lt;BR /&gt;      }&lt;BR /&gt;    print " $frag fragments in $file\n";&lt;BR /&gt;    }&lt;BR /&gt;  }&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Sample of ugly quote usage: &lt;BR /&gt;perl frags.pl """[...]*.mai""" *.log "'*.tmp'"&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 30 May 2006 06:52:17 GMT</pubDate>
    <dc:creator>Hein van den Heuvel</dc:creator>
    <dc:date>2006-05-30T06:52:17Z</dc:date>
    <item>
      <title>How to see the disk's fragment status or file's  fragment</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-see-the-disk-s-fragment-status-or-file-s-fragment/m-p/3796337#M9776</link>
      <description>Hi,&lt;BR /&gt;  Is there any command that can see disk's fragment status or file's fragment?</description>
      <pubDate>Mon, 29 May 2006 21:27:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-see-the-disk-s-fragment-status-or-file-s-fragment/m-p/3796337#M9776</guid>
      <dc:creator>skynet1980</dc:creator>
      <dc:date>2006-05-29T21:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to see the disk's fragment status or file's  fragment</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-see-the-disk-s-fragment-status-or-file-s-fragment/m-p/3796338#M9777</link>
      <description>&lt;BR /&gt;The HP Defrag tool DFO has a free reporting functions.&lt;BR /&gt;&lt;BR /&gt;Personally I would recommend picking up the DFU freeware tool. It is a must have for disk/file management with fragmentation reports and file search based on fragments, and extent-headers and more.&lt;BR /&gt;&lt;BR /&gt;For trivial/simple single file fragmenation analysis just use DUMP/HEADER/BLOCK=COUNT=0&lt;BR /&gt;&lt;BR /&gt;Good luck,&lt;BR /&gt;Hein.</description>
      <pubDate>Mon, 29 May 2006 21:31:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-see-the-disk-s-fragment-status-or-file-s-fragment/m-p/3796338#M9777</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-05-29T21:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to see the disk's fragment status or file's  fragment</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-see-the-disk-s-fragment-status-or-file-s-fragment/m-p/3796339#M9778</link>
      <description>or use this .com to report it (slowly).&lt;BR /&gt;&lt;BR /&gt;Wim</description>
      <pubDate>Tue, 30 May 2006 01:04:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-see-the-disk-s-fragment-status-or-file-s-fragment/m-p/3796339#M9778</guid>
      <dc:creator>Wim Van den Wyngaert</dc:creator>
      <dc:date>2006-05-30T01:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to see the disk's fragment status or file's  fragment</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-see-the-disk-s-fragment-status-or-file-s-fragment/m-p/3796340#M9779</link>
      <description>skynet1980,&lt;BR /&gt;&lt;BR /&gt;The DUMP/HEADER command will display the file header for an individual file, with complete information about the mapping pointers about which blocks (LBNs) on the disk are used by the file.&lt;BR /&gt;&lt;BR /&gt;- Bob Gezelter, &lt;A href="http://www.rlgsc.com" target="_blank"&gt;http://www.rlgsc.com&lt;/A&gt;</description>
      <pubDate>Tue, 30 May 2006 05:15:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-see-the-disk-s-fragment-status-or-file-s-fragment/m-p/3796340#M9779</guid>
      <dc:creator>Robert Gezelter</dc:creator>
      <dc:date>2006-05-30T05:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to see the disk's fragment status or file's  fragment</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/how-to-see-the-disk-s-fragment-status-or-file-s-fragment/m-p/3796341#M9780</link>
      <description>&lt;!--!*#--&gt;For your entertainment...&lt;BR /&gt;On the DUMP/HEAD, and processing the data.&lt;BR /&gt;Here is some more playing with perl:&lt;BR /&gt;&lt;BR /&gt;One liner for 1 file, avoiding 2 temp files:&lt;BR /&gt;&lt;BR /&gt;$ pipe DUMP/HEAD/BLOC=COUNT=0 test.mai | perl -ne "$frag++ if /^\s+Count:/; print ""$frag fragments\n"" if eof"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Script with args globbed from command line:&lt;BR /&gt;-------------------------------&lt;BR /&gt;while ($file=shift @ARGV) {&lt;BR /&gt;  $frag = 0;&lt;BR /&gt;  foreach (`DUMP/HEAD/BLOC=COUNT=0 $file`) {&lt;BR /&gt;    $frag++ if /^\s+Count:/&lt;BR /&gt;    }&lt;BR /&gt;  print "$frag fragments in $file\n";&lt;BR /&gt;  }&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please note the the wildcard file expansion is done before the script runs. This is often helpful, but actually tricky to avoid. One has to protect the wildcards with strong (') or double-double quotes to stop the help, and later strip those.&lt;BR /&gt;&lt;BR /&gt;Script with args explicitly processed&lt;BR /&gt;-------------------------------&lt;BR /&gt;while ($files = shift @ARGV) {&lt;BR /&gt;# print "--$files\n"&lt;BR /&gt;  $files =~ s/"|'//g; # strip quotes&lt;BR /&gt;  while ( $file = glob $files ) {&lt;BR /&gt;    $frag = 0;&lt;BR /&gt;    foreach (`DUMP/HEAD/BLOC=COUNT=0 $file`) {&lt;BR /&gt;      $frag++ if /^\s+Count:/&lt;BR /&gt;      }&lt;BR /&gt;    print " $frag fragments in $file\n";&lt;BR /&gt;    }&lt;BR /&gt;  }&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Sample of ugly quote usage: &lt;BR /&gt;perl frags.pl """[...]*.mai""" *.log "'*.tmp'"&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 30 May 2006 06:52:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/how-to-see-the-disk-s-fragment-status-or-file-s-fragment/m-p/3796341#M9780</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-05-30T06:52:17Z</dc:date>
    </item>
  </channel>
</rss>

