in reply to Re^5: Unix - Keep the last modified file in the directory and move/copy the rest of the files.
in thread Unix - Keep the last modified file in the directory and move/copy the rest of the files.

hi zengargoyle, Very sorry for the interruption again. Here is the query from my colleague again. What if I want to keep the last 5 hour modified file in the directory and move/copy the rest of the files. That is, those last modified files which dated within the last 5 hour will be keep. Hope to hear you soon. Thanks. rgds, hyliau
  • Comment on Re: Re^5: Unix - Keep the last modified file in the directory and move/copy the rest of the files.

Replies are listed 'Best First'.
Re: Re: Re^5: Unix - Keep the last modified file in the directory and move/copy the rest of the files.
by zengargoyle (Deacon) on Jun 09, 2003 at 23:04 UTC
    Here is the query from my colleague again. What if I want to keep the last 5 hour modified file in the directory and move/copy the rest of the files.

    you should tell your colleague to stop changing the requirements. things are now complicated enough that a perl solution would be better than a shell solution. see the other responses in the thread for pointers in that direction.

      hi zengargoyle, Sorry for the irritating and complexity request. I will look at other responses in the thread for pointers. At least I knew that to keep track last modified file base on time will be good to use perl script. Million Thanks. rgds, hyliau