cancel
Showing results for 
Search instead for 
Did you mean: 

Moving files

former_member759680
Contributor
0 Kudos

Hello,

We have SAP on AIX.

The /usr/sap/trans/logs has a lot of files from ages ago.

I found a command to delete files older than 365 days -

find . -type f -mtime +365 -name "." -exec rm -r > /tmp/purge_4aug.log {} \;

But, I just want to move them another directory instead of directly deleting them

I am unable to modify the above command to use it to move the files.

Kindly help.

Accepted Solutions (1)

Accepted Solutions (1)

former_member204746
Active Contributor
0 Kudos

find /usr/sap/trans/logs -type f -mtime +365 -exec mv {} /another/directory/of/your/choice \;

Edited by: Eric Brunelle on Oct 15, 2010 11:13 AM

Answers (0)