log-file-cleaning

Log file cleaning script that deletes old files and logrotate files

https://github.com/sixarm/log-file-cleaning

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.1%) to scientific vocabulary

Keywords

log logrotate script shell sysadmin
Last synced: 4 months ago · JSON representation ·

Repository

Log file cleaning script that deletes old files and logrotate files

Basic Info
  • Host: GitHub
  • Owner: SixArm
  • Language: Shell
  • Default Branch: main
  • Size: 6.84 KB
Statistics
  • Stars: 4
  • Watchers: 3
  • Forks: 3
  • Open Issues: 0
  • Releases: 0
Topics
log logrotate script shell sysadmin
Created over 9 years ago · Last pushed 9 months ago
Metadata Files
Readme Code of conduct Citation Codeowners

README.md

Log file cleaning script

This script deletes typical old log files, logrotate files, and similar log backups.

Please be certain you don't need these log files before you run this.

Syntax:

log-file-cleaning [path]

Example:

log-file-cleaning /var/log

The path default is /var/log which is typical on popular Unix systems.

You can customize the command by providing your own rm command as an environment variable.

Example:

rm="/bin/rm" log-file-cleaning

Specifics

This removes many kinds of log files.

File names that end with:

  • .bz2
  • .gz
  • .old
  • .bak
  • .backup
  • .log.[0-9]*
  • .[0-9]*.log

File names that match:

  • btmp.[0-9]*
  • dmesg.[0-9]*
  • mail.err.[0-9]*
  • syslog.[0-9]*
  • wtmp.[0-9]*
  • xferlog.[0-9]*

Any atop files.

  • atop/atop_[0-9]*

Any Mac OSX Apple System Log files:

  • asl/*.asl
  • DiagnosticMessages/*.asl

Implementation notes

This script aims to work even when a disk is full or commands are missing. For example, this scripts starts by deleting files one name by one name, rather than relying on more-sophisticated file globbing or using find.

This script source code aims to be descriptive and meaningful, so a systems administrator can easily comment out lines as needed, or add new lines easily without affecting any other lines.

If you are a developer who is creating a patch or pull request, please keep this code pattern, rather than trying to introduce features such as more globbing, loops, non-POSIX commands, etc.

Tracking

  • Command: log-file-cleaning
  • Version: 3.0.0
  • Created: 2012-12-09
  • Updated: 2016-08-27
  • Contact: Joel Parker Henderson (joel@joelparkerhenderson.com)
  • License: GPL

Owner

  • Name: SixArm
  • Login: SixArm
  • Kind: organization
  • Email: sixarm@sixarm.com
  • Location: San Francisco

SixArm Software

Citation (CITATION.cff)

cff-version: 1.2.0
title: Log file cleaning script
message: >-
  If you use this work and you want to cite it,
  then you can use the metadata from this file.
type: software
authors:
  - given-names: Joel Parker
    family-names: Henderson
    email: joel@joelparkerhenderson.com
    affiliation: joelparkerhenderson.com
    orcid: 'https://orcid.org/0009-0000-4681-282X'
identifiers:
  - type: url
    value: 'https://github.com/SixArm/log-file-cleaning/'
    description: Log file cleaning script
repository-code: 'https://github.com/SixArm/log-file-cleaning/'
abstract: >-
  Log file cleaning script
license: See license file

GitHub Events

Total
  • Push event: 1
Last Year
  • Push event: 1

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 8
  • Total Committers: 1
  • Avg Commits per committer: 8.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 1
  • Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Joel Parker Henderson j****l@j****m 8
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels