HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

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
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...