Saturday, December 30, 2017

shell AIX Clear contents of files larger than 100 MB

shell AIX Clear contents of files larger than 100 MB



I am looking for all the files to be cleared in a directory that has exceeded 100 MB I have an AX box And it is creating logs that are quickly replenishing space. I do not want to delete the file just want to clear the contents.

When the prod file is not open, you can use

  Find your logger type-type F -size + 100M -exec cp / dev / null {} ;  

Edit, view comments:
When M flag is not supported on your system, enter a longer number.



go to link download

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.