Script delete file older than 30 days


















The Overflow Blog. Podcast Helping communities build their own LTE networks. Podcast Making Agile work for data science. Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Visit chat. Related Hot Network Questions. Question feed. In case if there are no files, I should log an error saying no files to delete. Please let me know, How I can achive this. Delete folders older than 30 days.

Dear all, i use incremental backup my data with. Regards, 2 Replies. Delete files older than 30 days. Hi all, I want to delete log files with extension. How to delete those files? Operating system -- Sun solaris 10 Your input is highly appreciated. Thanks in advance. Regards, Williams 2 Replies. This is driving me crazy. How can I delete files in a specifc directory that are over 30 days old?

Instead of deleting all files, you can also add more filters to find command. Above command will delete only files having. Using the -delete option may fail, if the directory is not empty.

In that case we will use Linux rm command with find command. Here we can execute the rm command using -exec command line option. Find command output will be send to rm command as input. In this tutorial, you have learned to search and delete files modified older than specific days in Linux command line. How do I write a script and scheduled to run monthly to delete backup files x. This only removes the files. What if you have a sub folders and you also want to delete these.

What do you do then? Links Link to another source Link to another code Referral link Link to hosting. Wrong task Spam The condition does not exist or is incorrectly given Not school Lots of codes examples Banal code Offensive content.

Incorrect subject. Advertising or spam. The question contains personal information. A question from the current exam or control work. Close Send. Copy or plagiarism.



0コメント

  • 1000 / 1000