{"id":22808621,"url":"https://github.com/sixarm/log-file-cleaning","last_synced_at":"2025-11-07T07:04:26.227Z","repository":{"id":137270383,"uuid":"66735349","full_name":"SixArm/log-file-cleaning","owner":"SixArm","description":"Log file cleaning script that deletes old files and logrotate files","archived":false,"fork":false,"pushed_at":"2025-04-14T08:45:27.000Z","size":7,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-22T13:06:23.967Z","etag":null,"topics":["log","logrotate","script","shell","sysadmin"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SixArm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-27T21:01:12.000Z","updated_at":"2025-04-14T08:45:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"24c38ca8-c9d0-4fb4-adf0-9b0ec514612a","html_url":"https://github.com/SixArm/log-file-cleaning","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SixArm%2Flog-file-cleaning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SixArm%2Flog-file-cleaning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SixArm%2Flog-file-cleaning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SixArm%2Flog-file-cleaning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SixArm","download_url":"https://codeload.github.com/SixArm/log-file-cleaning/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250247529,"owners_count":21399104,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["log","logrotate","script","shell","sysadmin"],"created_at":"2024-12-12T11:10:59.171Z","updated_at":"2025-11-07T07:04:26.159Z","avatar_url":"https://github.com/SixArm.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Log file cleaning script\n\nThis script deletes typical old log files, \nlogrotate files, and similar log backups.\n\nPlease be certain you don't need\nthese log files before you run this.\n\nSyntax:\n\n    log-file-cleaning [path]\n\nExample:\n\n    log-file-cleaning /var/log\n\nThe path default is `/var/log` which is typical on popular Unix systems.\n\nYou can customize the command by providing your own `rm` command\nas an environment variable.\n\nExample:\n\n    rm=\"/bin/rm\" log-file-cleaning\n\n## Specifics\n\nThis removes many kinds of log files.\n\nFile names that end with:\n\n  * .bz2\n  * .gz\n  * .old\n  * .bak\n  * .backup\n  * .log.[0-9]*\n  * .[0-9]*.log\n\nFile names that match:\n\n  * btmp.[0-9]*\n  * dmesg.[0-9]*\n  * mail.err.[0-9]*\n  * syslog.[0-9]*\n  * wtmp.[0-9]*\n  * xferlog.[0-9]*\n\nAny `atop` files. \n\n  * atop/atop_[0-9]*\n\nAny Mac OSX Apple System Log files:\n\n  * asl/*.asl\n  * DiagnosticMessages/*.asl\n\n## Implementation notes\n\nThis script aims to work even when a disk is full or commands are missing.\nFor example, this scripts starts by deleting files one name by one name,\nrather than relying on more-sophisticated file globbing or using `find`.\n\nThis script source code aims to be descriptive and meaningful,\nso a systems administrator can easily comment out lines as needed,\nor add new lines easily without affecting any other lines.\n\nIf you are a developer who is creating a patch or pull request,\nplease keep this code pattern, rather than trying to introduce \nfeatures such as more globbing, loops, non-POSIX commands, etc.\n\n## Tracking\n\n* Command: log-file-cleaning\n* Version: 3.0.0\n* Created: 2012-12-09\n* Updated: 2016-08-27\n* Contact: Joel Parker Henderson (joel@joelparkerhenderson.com)\n* License: GPL\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsixarm%2Flog-file-cleaning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsixarm%2Flog-file-cleaning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsixarm%2Flog-file-cleaning/lists"}