<?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 help with find in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-find/m-p/4016417#M299463</link>
    <description>Hello&lt;BR /&gt;&lt;BR /&gt;I am doing a small migration.&lt;BR /&gt;Last week I copied all of the data from mounta to mountb. This copy took about 14 hours do to the amount of data. &lt;BR /&gt;&lt;BR /&gt;Now instead of taking 14 hours I would like to run a find command to find files newer then 7 days and copy them from mounta to mountb. &lt;BR /&gt;&lt;BR /&gt;The problem is that my find syntax does not seem to be smart enough to copy them into the correct directory / subdirectory structure.&lt;BR /&gt;&lt;BR /&gt;How can I find files newer then 7 days and make sure that file gets copied into the correct directory.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 08 Jun 2007 11:05:08 GMT</pubDate>
    <dc:creator>rleon</dc:creator>
    <dc:date>2007-06-08T11:05:08Z</dc:date>
    <item>
      <title>help with find</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-find/m-p/4016417#M299463</link>
      <description>Hello&lt;BR /&gt;&lt;BR /&gt;I am doing a small migration.&lt;BR /&gt;Last week I copied all of the data from mounta to mountb. This copy took about 14 hours do to the amount of data. &lt;BR /&gt;&lt;BR /&gt;Now instead of taking 14 hours I would like to run a find command to find files newer then 7 days and copy them from mounta to mountb. &lt;BR /&gt;&lt;BR /&gt;The problem is that my find syntax does not seem to be smart enough to copy them into the correct directory / subdirectory structure.&lt;BR /&gt;&lt;BR /&gt;How can I find files newer then 7 days and make sure that file gets copied into the correct directory.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 08 Jun 2007 11:05:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-find/m-p/4016417#M299463</guid>
      <dc:creator>rleon</dc:creator>
      <dc:date>2007-06-08T11:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: help with find</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-find/m-p/4016418#M299464</link>
      <description>&lt;BR /&gt;cd /mounta&lt;BR /&gt;find . -depth -mtime -7 -print |cpio -pmvdu /mountb&lt;BR /&gt;&lt;BR /&gt;Hope it will help&lt;BR /&gt;&lt;BR /&gt;see man pages for cpio</description>
      <pubDate>Fri, 08 Jun 2007 11:10:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-find/m-p/4016418#M299464</guid>
      <dc:creator>Redhat</dc:creator>
      <dc:date>2007-06-08T11:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: help with find</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-find/m-p/4016419#M299465</link>
      <description>Sounds like rsync would be a better choice of tools for this.</description>
      <pubDate>Fri, 08 Jun 2007 11:10:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-find/m-p/4016419#M299465</guid>
      <dc:creator>Jeff_Traigle</dc:creator>
      <dc:date>2007-06-08T11:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: help with find</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-find/m-p/4016420#M299466</link>
      <description>I am sure "find /source -print | cpio -pdm /destination" will do the job. The cpio command make sure that it does not try to copy things that are already in the target.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Kaps</description>
      <pubDate>Fri, 08 Jun 2007 11:16:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-find/m-p/4016420#M299466</guid>
      <dc:creator>KapilRaj</dc:creator>
      <dc:date>2007-06-08T11:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: help with find</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-find/m-p/4016421#M299467</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;This shell script has received only cursory testing by me, so use with care:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;typeset -i MAXAGE=7&lt;BR /&gt;typeset SRCMP=/mounta&lt;BR /&gt;typeset DSTMP=/mountb&lt;BR /&gt;&lt;BR /&gt;for F in $(find ${SRCMP} -type f -mtime -${MAXAGE} -print)&lt;BR /&gt;do&lt;BR /&gt;    DIRNAME=${F%/*}&lt;BR /&gt;    BASENAME=${F##*/}&lt;BR /&gt;    DSTPATH=${DSTMP}${DIRNAME#${SRCMP}}&lt;BR /&gt;    if [ ! -d ${DSTPATH} ]&lt;BR /&gt;    then&lt;BR /&gt;        mkdir -p ${DSTPATH}&lt;BR /&gt;        echo "*** Created directory ${DSTPATH}"&lt;BR /&gt;    fi&lt;BR /&gt;    echo "Copying ${F} to ${DSTPATH}"&lt;BR /&gt;    cp -p ${F} ${DSTPATH}&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;PCS</description>
      <pubDate>Fri, 08 Jun 2007 11:39:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-find/m-p/4016421#M299467</guid>
      <dc:creator>spex</dc:creator>
      <dc:date>2007-06-08T11:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: help with find</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-find/m-p/4016422#M299468</link>
      <description>You can also use fbackup for selectively pickup the files and restore using frecover on the fly. &lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Raj.</description>
      <pubDate>Fri, 08 Jun 2007 12:45:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-find/m-p/4016422#M299468</guid>
      <dc:creator>Raj D.</dc:creator>
      <dc:date>2007-06-08T12:45:20Z</dc:date>
    </item>
  </channel>
</rss>

