<?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: shell scripting in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/4974029#M418558</link>
    <description>Hari,&lt;BR /&gt;if you want to use the filename date, you could download a. Clay Stephensons caljd.sh&lt;BR /&gt;at &lt;A href="http://mirrors.develooper.com/hpux/caljd-2.23.sh" target="_blank"&gt;http://mirrors.develooper.com/hpux/caljd-2.23.sh&lt;/A&gt;&lt;BR /&gt; and use the convert date to julian function.&lt;BR /&gt;Subtract the filename date from the current date and you would get the "age" of your file.</description>
    <pubDate>Tue, 18 Apr 2006 04:31:41 GMT</pubDate>
    <dc:creator>Peter Godron</dc:creator>
    <dc:date>2006-04-18T04:31:41Z</dc:date>
    <item>
      <title>shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/4974024#M418553</link>
      <description>Hi guys,&lt;BR /&gt;&lt;BR /&gt;i need some help on shell scripting, currently i have written one script which take backup of some files and place it on one of the other partition with date and time stamp specified on the file name.&lt;BR /&gt;&lt;BR /&gt;i want to know how to make retention period for the same.&lt;BR /&gt;&lt;BR /&gt;shell script is given below&lt;BR /&gt;&lt;BR /&gt;!#/bin/sh&lt;BR /&gt;FILENAME=`date +3dpl_lv0_%Y%m%d%H%M`&lt;BR /&gt;cp /essbdata1/levzerodata/lev03dpl.txt /essbdata1/back-hyp/${FILENAME}.txt&lt;BR /&gt;tar -cvf ${FILENAME}.tar ${FILENAME}.txt&lt;BR /&gt;gzip ${FILENAME}.tar&lt;BR /&gt;&lt;BR /&gt;thanks in advance</description>
      <pubDate>Tue, 18 Apr 2006 02:08:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/4974024#M418553</guid>
      <dc:creator>hari prasad_4</dc:creator>
      <dc:date>2006-04-18T02:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/4974025#M418554</link>
      <description>you can write and another script and  which checks the period you specified, and delete archives which passsed retention time. then you can put it in cron.</description>
      <pubDate>Tue, 18 Apr 2006 02:47:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/4974025#M418554</guid>
      <dc:creator>Kenan Erdey</dc:creator>
      <dc:date>2006-04-18T02:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/4974026#M418555</link>
      <description>Hari,&lt;BR /&gt;if you want to keep the tar file for 28 days:&lt;BR /&gt;&lt;BR /&gt;cd tar-directory&lt;BR /&gt;find . -mtime +28 -exec rm -f {} \;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This finds and removes ALL files which have not been modified in the last 28 days. This also includes any sub-directories.&lt;BR /&gt;&lt;BR /&gt;see man find  for more details</description>
      <pubDate>Tue, 18 Apr 2006 03:12:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/4974026#M418555</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-04-18T03:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/4974027#M418556</link>
      <description>Hi, &lt;BR /&gt;You may use cp -p to preserve date and time of file modifications, and then use 'find -mtime ' to manage retention period. &lt;BR /&gt;&lt;BR /&gt;HTH, &lt;BR /&gt;antonio.&lt;BR /&gt;</description>
      <pubDate>Tue, 18 Apr 2006 03:19:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/4974027#M418556</guid>
      <dc:creator>Antonio Cardoso_1</dc:creator>
      <dc:date>2006-04-18T03:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/4974028#M418557</link>
      <description>hi,&lt;BR /&gt;if you check the file name, it has been given as year month date hour and minute.&lt;BR /&gt;&lt;BR /&gt;So based on that i need to check the file name.&lt;BR /&gt;&lt;BR /&gt;thanks</description>
      <pubDate>Tue, 18 Apr 2006 04:21:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/4974028#M418557</guid>
      <dc:creator>hari prasad_4</dc:creator>
      <dc:date>2006-04-18T04:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/4974029#M418558</link>
      <description>Hari,&lt;BR /&gt;if you want to use the filename date, you could download a. Clay Stephensons caljd.sh&lt;BR /&gt;at &lt;A href="http://mirrors.develooper.com/hpux/caljd-2.23.sh" target="_blank"&gt;http://mirrors.develooper.com/hpux/caljd-2.23.sh&lt;/A&gt;&lt;BR /&gt; and use the convert date to julian function.&lt;BR /&gt;Subtract the filename date from the current date and you would get the "age" of your file.</description>
      <pubDate>Tue, 18 Apr 2006 04:31:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/4974029#M418558</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-04-18T04:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/4974030#M418559</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;did you try this script can you let me know how this work, bcoz i need to implement those script in production and live servers&lt;BR /&gt;&lt;BR /&gt;thanks&lt;BR /&gt;</description>
      <pubDate>Tue, 18 Apr 2006 09:27:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/4974030#M418559</guid>
      <dc:creator>hari prasad_4</dc:creator>
      <dc:date>2006-04-18T09:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/4974031#M418560</link>
      <description>Hari,&lt;BR /&gt;download the latest version caljd-2.25.sh from the same directory and save it as caljd.sh&lt;BR /&gt;caljd.sh -help    for more help&lt;BR /&gt;For your example:&lt;BR /&gt;$ ./caljd.sh -y 2006 04 18&lt;BR /&gt;2453844&lt;BR /&gt;For example if the filedate was 2006 05 17&lt;BR /&gt;$ ./caljd.sh -y &lt;FILEDATE&gt;&lt;BR /&gt;2453843&lt;BR /&gt;&lt;BR /&gt;then subtract one from the other and you have the difference in days between the current date and the filename date.&lt;BR /&gt;&lt;BR /&gt;&lt;/FILEDATE&gt;</description>
      <pubDate>Tue, 18 Apr 2006 09:46:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/4974031#M418560</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-04-18T09:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/4974032#M418561</link>
      <description>thanks for all of your help</description>
      <pubDate>Fri, 21 Apr 2006 23:29:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/4974032#M418561</guid>
      <dc:creator>hari prasad_4</dc:creator>
      <dc:date>2006-04-21T23:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/4974033#M418562</link>
      <description>..&lt;BR /&gt;</description>
      <pubDate>Fri, 21 Apr 2006 23:33:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/4974033#M418562</guid>
      <dc:creator>hari prasad_4</dc:creator>
      <dc:date>2006-04-21T23:33:17Z</dc:date>
    </item>
  </channel>
</rss>

