<?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: Delete Empty directories in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-empty-directories/m-p/5027304#M430004</link>
    <description>Thanks Peter, I have similar shell script but was looking for something more 'eligant' and the perl script just did the trick. ;-) Ta</description>
    <pubDate>Thu, 08 Feb 2007 05:24:09 GMT</pubDate>
    <dc:creator>DavidJ</dc:creator>
    <dc:date>2007-02-08T05:24:09Z</dc:date>
    <item>
      <title>Delete Empty directories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-empty-directories/m-p/5027300#M430000</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Does anyone out there have a script which does a search and distroy for empty directories on your system?&lt;BR /&gt;&lt;BR /&gt;The -empty option is not valid for "find" on HP-UX ;-(&lt;BR /&gt;&lt;BR /&gt;tia</description>
      <pubDate>Thu, 08 Feb 2007 04:20:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-empty-directories/m-p/5027300#M430000</guid>
      <dc:creator>DavidJ</dc:creator>
      <dc:date>2007-02-08T04:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Empty directories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-empty-directories/m-p/5027301#M430001</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please try to use 'rmdir' - remove empty directories&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;rgds&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Feb 2007 04:31:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-empty-directories/m-p/5027301#M430001</guid>
      <dc:creator>Yarek</dc:creator>
      <dc:date>2007-02-08T04:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Empty directories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-empty-directories/m-p/5027302#M430002</link>
      <description>David,&lt;BR /&gt;please see:&lt;BR /&gt;&lt;A href="http://duramecho.com/ComputerPrograms/DeleteEmptyDirectories/index.html" target="_blank"&gt;http://duramecho.com/ComputerPrograms/DeleteEmptyDirectories/index.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;You can try the Perl sulution on a TEST filesystem. Seemed to work for me !&lt;BR /&gt;&lt;BR /&gt;Or download gnu find and use the -empty option.&lt;BR /&gt;&lt;BR /&gt;Please also read:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/helptips.do?#33" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/helptips.do?#33&lt;/A&gt; on how to reward any useful answers given to your questions.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Feb 2007 04:39:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-empty-directories/m-p/5027302#M430002</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2007-02-08T04:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Empty directories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-empty-directories/m-p/5027303#M430003</link>
      <description>David,&lt;BR /&gt;bit slow at work here, so I put together this script. It may still need some fine tuning, so please test it first !&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;# Pull out a list of all directories&lt;BR /&gt;find . -depth -type d &amp;gt; /tmp/x.x&lt;BR /&gt;while read direc&lt;BR /&gt;do&lt;BR /&gt;# count the number of files in each directory&lt;BR /&gt;count=`ll -1a $direc | wc -l`&lt;BR /&gt;echo $direc $count&lt;BR /&gt;if [ $count -eq 3 ]&lt;BR /&gt;then&lt;BR /&gt;rmdir $direc&lt;BR /&gt;fi&lt;BR /&gt;done &amp;lt; /tmp/x.x&lt;BR /&gt;rm /tmp/x.x</description>
      <pubDate>Thu, 08 Feb 2007 05:04:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-empty-directories/m-p/5027303#M430003</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2007-02-08T05:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Empty directories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-empty-directories/m-p/5027304#M430004</link>
      <description>Thanks Peter, I have similar shell script but was looking for something more 'eligant' and the perl script just did the trick. ;-) Ta</description>
      <pubDate>Thu, 08 Feb 2007 05:24:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-empty-directories/m-p/5027304#M430004</guid>
      <dc:creator>DavidJ</dc:creator>
      <dc:date>2007-02-08T05:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Empty directories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-empty-directories/m-p/5027305#M430005</link>
      <description>It seems you can just use find and rmdir and ignore the zillions of errors.  I'm not sure if it is worth Peter's checking script:&lt;BR /&gt;&lt;BR /&gt;find some-path -depth -type d -exec rmdir + 2&amp;gt;&amp;amp;1 | \&lt;BR /&gt;grep -v "rmdir.*Directory not empty"</description>
      <pubDate>Thu, 08 Feb 2007 05:26:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-empty-directories/m-p/5027305#M430005</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-02-08T05:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Empty directories</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/delete-empty-directories/m-p/5027306#M430006</link>
      <description>Thanks All&lt;BR /&gt;&lt;BR /&gt;The Perl script fits the bill perfectly.&lt;BR /&gt;&lt;BR /&gt;perl -MFile::Find -e"finddepth(subrmdir},'.')"</description>
      <pubDate>Thu, 08 Feb 2007 05:32:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/delete-empty-directories/m-p/5027306#M430006</guid>
      <dc:creator>DavidJ</dc:creator>
      <dc:date>2007-02-08T05:32:01Z</dc:date>
    </item>
  </channel>
</rss>

