Operating System - HP-UX
1752785 Members
5971 Online
108789 Solutions
New Discussion юеВ

Re: How to copy one particular date files.

 
SOLVED
Go to solution
jeevarajkn
Frequent Advisor

How to copy one particular date files.

Hi All

OS--HPUX 11.23

I have filesystem which contains only some trace files which is generating daily.

From yhis file systems how I can move particular date files to another filesystem

Eg:-From full Dec month files I want to copy only 20th Dec files to another filesystem.

Please help me...
3 REPLIES 3
Dennis Handly
Acclaimed Contributor
Solution

Re: How to copy one particular date files.

Copy the file based on modification time? Or names? For the former, you can use touch and find to establish a range of times to move/copy:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1306285
bright image
Frequent Advisor

Re: How to copy one particular date files.

If you need to specify a date you could do something like:

for file in $(ls -l |grep "Dec 20" |awk '{print $9}')
do
echo "copy file $file"
cp $file /$file
done
jeevarajkn
Frequent Advisor

Re: How to copy one particular date files.

Thanx to All...