Skip to content

architxkumar/Log-Archive-Tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Log Archive Tool

A shell script to help with archiving logs on your machine. It accepts log directory as argument, compresses the logs and stores them in a new directory.

Built as a learning project for DevOps Roadmap on roadmap.sh.

Features

  • Path specification via CLI arguments
  • Input validation
  • Automatic directory creation
  • Timestamp-based naming

Technology

  • Bash

Installation

git clone https://github.com/architxkumar/Log-Archive-Tool.git
cd Log-Archive-Tool
chmod u+x ./log-archive.sh

Usage

./log-archive.sh [Source-Directory] [Target-Directory]

Note

Source Directory refers to log files path. Target Directory refers to the path where the zip will be compressed

Important

All visible files inside the Source directory will be compressed

Examples

Screenshot of bash terminal demonstrating script usage Screenshot of bash terminal showing the compressed tarball in output directory

License

Project is licensed under MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages