<?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: Deelete command in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/deelete-command/m-p/3543694#M223758</link>
    <description>The key to what you are trying to do is the find command.&lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;&lt;BR /&gt;cd to desired starting directory&lt;BR /&gt;find . -type f -name 'myfile*' -mtime +30 -exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;This will remove all regular files (-type f) that match the pattern 'myfile*' that have not been modified in more than days. &lt;BR /&gt;&lt;BR /&gt;I suggest that you replace the:&lt;BR /&gt;-exec rm {} \;&lt;BR /&gt;with a safer command such as:&lt;BR /&gt;-exec ls -l {} \;&lt;BR /&gt;until you get a better understanding of the find command.&lt;BR /&gt;&lt;BR /&gt;Man find for details.&lt;BR /&gt;</description>
    <pubDate>Thu, 12 May 2005 15:26:42 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2005-05-12T15:26:42Z</dc:date>
    <item>
      <title>Deelete command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deelete-command/m-p/3543692#M223756</link>
      <description>Dear all&lt;BR /&gt;&lt;BR /&gt;i need to delete some files that are older than a specific date, can someone tell me what is the command to do that ?&lt;BR /&gt;&lt;BR /&gt;also what if these files are in folders ? and i want to remove these folders also that are older than specific date ?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;BR /&gt;</description>
      <pubDate>Thu, 12 May 2005 15:15:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deelete-command/m-p/3543692#M223756</guid>
      <dc:creator>Ahmed_41</dc:creator>
      <dc:date>2005-05-12T15:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: Deelete command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deelete-command/m-p/3543693#M223757</link>
      <description>Check the man page for find.&lt;BR /&gt;&lt;BR /&gt;Essentially something like this.&lt;BR /&gt;&lt;BR /&gt;find . -mtime +N | xargs rm&lt;BR /&gt;&lt;BR /&gt;This will search the current directory and subdirectories for files last modified N number of days ago and remove them.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 12 May 2005 15:24:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deelete-command/m-p/3543693#M223757</guid>
      <dc:creator>Sean OB_1</dc:creator>
      <dc:date>2005-05-12T15:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Deelete command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deelete-command/m-p/3543694#M223758</link>
      <description>The key to what you are trying to do is the find command.&lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;&lt;BR /&gt;cd to desired starting directory&lt;BR /&gt;find . -type f -name 'myfile*' -mtime +30 -exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;This will remove all regular files (-type f) that match the pattern 'myfile*' that have not been modified in more than days. &lt;BR /&gt;&lt;BR /&gt;I suggest that you replace the:&lt;BR /&gt;-exec rm {} \;&lt;BR /&gt;with a safer command such as:&lt;BR /&gt;-exec ls -l {} \;&lt;BR /&gt;until you get a better understanding of the find command.&lt;BR /&gt;&lt;BR /&gt;Man find for details.&lt;BR /&gt;</description>
      <pubDate>Thu, 12 May 2005 15:26:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deelete-command/m-p/3543694#M223758</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-05-12T15:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Deelete command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deelete-command/m-p/3543695#M223759</link>
      <description>What you are asking here is very dangerous! There are many OS files that fall into this category. &lt;BR /&gt;&lt;BR /&gt;DO NOT DO THIS SYSTEM WIDE!&lt;BR /&gt;&lt;BR /&gt;You can use the find command to find files that are older than a certain number of days. BEWARE, some OS files will qualify in this condition. &lt;BR /&gt;&lt;BR /&gt;DO NOT DO THIS SYSTEM WIDE!&lt;BR /&gt;&lt;BR /&gt;Do it in a relatively safe area, such as the users /home directory.&lt;BR /&gt;&lt;BR /&gt;# cd /home/&lt;USER_NAME&gt;&lt;BR /&gt;# find . -mtime +100 -exec rm {} \;&lt;BR /&gt;The rm -f will delete the directories.&lt;BR /&gt;&lt;BR /&gt;Again, you do this command from the root directory and you will wipe out your system!&lt;BR /&gt;&lt;BR /&gt;A final statement that should be a given, make sure you have good backups! If you do this command incorrectly and do not have good backups and an ignite tape, you have a dead system!&lt;BR /&gt;&lt;BR /&gt;Again, much care is to be taken!&lt;BR /&gt;&lt;BR /&gt;-&lt;/USER_NAME&gt;</description>
      <pubDate>Thu, 12 May 2005 15:26:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deelete-command/m-p/3543695#M223759</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2005-05-12T15:26:50Z</dc:date>
    </item>
  </channel>
</rss>

