Using logrotate to delete files based upon free disk space on an nfs mount [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I would like to delete data in an NFS export based upon either age or upon disk space being used (not wanting to fill the disk).



The plan was to use logrotate.










share|improve this question















closed as unclear what you're asking by Jeff Schaller, Rui F Ribeiro, steve, RalfFriedl, Scott Nov 27 at 4:26


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • Can you take some of the "or"'s out of your question? What do you want to do - delete files based on free disk space or age, or some combination? Keep in mind that logrotate rotates files, and has options for removing older rotated files, but its main job is not deleting files based on age or free space.
    – Jeff Schaller
    Nov 26 at 20:38






  • 1




    Why not using find to delete files based on age (ie 14 days old)? find /foo -type f -mtime +14 -delete and/or/or maybe not use the -size switch.
    – Michael D.
    Nov 26 at 22:34










  • Thank you Jeff and Michael. I was going to go the route of using find but was instructed to use logrotate. I might as well setup the find job in a cronjob.
    – norseman
    Nov 27 at 18:05










  • I was thinking of using the command in logrotate after the postrotate entry. But maybe that wouldn't be a good place.
    – norseman
    Nov 27 at 19:30















up vote
0
down vote

favorite












I would like to delete data in an NFS export based upon either age or upon disk space being used (not wanting to fill the disk).



The plan was to use logrotate.










share|improve this question















closed as unclear what you're asking by Jeff Schaller, Rui F Ribeiro, steve, RalfFriedl, Scott Nov 27 at 4:26


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • Can you take some of the "or"'s out of your question? What do you want to do - delete files based on free disk space or age, or some combination? Keep in mind that logrotate rotates files, and has options for removing older rotated files, but its main job is not deleting files based on age or free space.
    – Jeff Schaller
    Nov 26 at 20:38






  • 1




    Why not using find to delete files based on age (ie 14 days old)? find /foo -type f -mtime +14 -delete and/or/or maybe not use the -size switch.
    – Michael D.
    Nov 26 at 22:34










  • Thank you Jeff and Michael. I was going to go the route of using find but was instructed to use logrotate. I might as well setup the find job in a cronjob.
    – norseman
    Nov 27 at 18:05










  • I was thinking of using the command in logrotate after the postrotate entry. But maybe that wouldn't be a good place.
    – norseman
    Nov 27 at 19:30













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I would like to delete data in an NFS export based upon either age or upon disk space being used (not wanting to fill the disk).



The plan was to use logrotate.










share|improve this question















I would like to delete data in an NFS export based upon either age or upon disk space being used (not wanting to fill the disk).



The plan was to use logrotate.







files date nfs rm logrotate






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 26 at 20:37









Jeff Schaller

37k1052121




37k1052121










asked Nov 26 at 20:20









norseman

1




1




closed as unclear what you're asking by Jeff Schaller, Rui F Ribeiro, steve, RalfFriedl, Scott Nov 27 at 4:26


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






closed as unclear what you're asking by Jeff Schaller, Rui F Ribeiro, steve, RalfFriedl, Scott Nov 27 at 4:26


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.













  • Can you take some of the "or"'s out of your question? What do you want to do - delete files based on free disk space or age, or some combination? Keep in mind that logrotate rotates files, and has options for removing older rotated files, but its main job is not deleting files based on age or free space.
    – Jeff Schaller
    Nov 26 at 20:38






  • 1




    Why not using find to delete files based on age (ie 14 days old)? find /foo -type f -mtime +14 -delete and/or/or maybe not use the -size switch.
    – Michael D.
    Nov 26 at 22:34










  • Thank you Jeff and Michael. I was going to go the route of using find but was instructed to use logrotate. I might as well setup the find job in a cronjob.
    – norseman
    Nov 27 at 18:05










  • I was thinking of using the command in logrotate after the postrotate entry. But maybe that wouldn't be a good place.
    – norseman
    Nov 27 at 19:30

















  • Can you take some of the "or"'s out of your question? What do you want to do - delete files based on free disk space or age, or some combination? Keep in mind that logrotate rotates files, and has options for removing older rotated files, but its main job is not deleting files based on age or free space.
    – Jeff Schaller
    Nov 26 at 20:38






  • 1




    Why not using find to delete files based on age (ie 14 days old)? find /foo -type f -mtime +14 -delete and/or/or maybe not use the -size switch.
    – Michael D.
    Nov 26 at 22:34










  • Thank you Jeff and Michael. I was going to go the route of using find but was instructed to use logrotate. I might as well setup the find job in a cronjob.
    – norseman
    Nov 27 at 18:05










  • I was thinking of using the command in logrotate after the postrotate entry. But maybe that wouldn't be a good place.
    – norseman
    Nov 27 at 19:30
















Can you take some of the "or"'s out of your question? What do you want to do - delete files based on free disk space or age, or some combination? Keep in mind that logrotate rotates files, and has options for removing older rotated files, but its main job is not deleting files based on age or free space.
– Jeff Schaller
Nov 26 at 20:38




Can you take some of the "or"'s out of your question? What do you want to do - delete files based on free disk space or age, or some combination? Keep in mind that logrotate rotates files, and has options for removing older rotated files, but its main job is not deleting files based on age or free space.
– Jeff Schaller
Nov 26 at 20:38




1




1




Why not using find to delete files based on age (ie 14 days old)? find /foo -type f -mtime +14 -delete and/or/or maybe not use the -size switch.
– Michael D.
Nov 26 at 22:34




Why not using find to delete files based on age (ie 14 days old)? find /foo -type f -mtime +14 -delete and/or/or maybe not use the -size switch.
– Michael D.
Nov 26 at 22:34












Thank you Jeff and Michael. I was going to go the route of using find but was instructed to use logrotate. I might as well setup the find job in a cronjob.
– norseman
Nov 27 at 18:05




Thank you Jeff and Michael. I was going to go the route of using find but was instructed to use logrotate. I might as well setup the find job in a cronjob.
– norseman
Nov 27 at 18:05












I was thinking of using the command in logrotate after the postrotate entry. But maybe that wouldn't be a good place.
– norseman
Nov 27 at 19:30





I was thinking of using the command in logrotate after the postrotate entry. But maybe that wouldn't be a good place.
– norseman
Nov 27 at 19:30
















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay