GithubHelp home page GithubHelp logo

rapidwebltd / backup-deletion Goto Github PK

View Code? Open in Web Editor NEW
2.0 6.0 0.0 6 KB

๐Ÿ’พ Shell script to identify date named backups and remove them

License: MIT License

Shell 100.00%
backup-files backup-deletion

backup-deletion's Introduction

Overview

This shell script is designed to identify any backup files present in a git repository, remove them from the repository (via git rm) and optionally commit and push the changes.

Backup files

Backup files are identified based on their file names ending with an underscore _ following by a string that represents a date.

The following are examples of file names which will be matched by this script.

  • terms_3rdOct2011.php
  • test_8th_June_2011.php
  • logout_5thOct2011.php
  • test_260215.php
  • style_25thJune2015.css
  • style_31st_May_2013.css
  • script_20th_May_2015.js

File types

This script currently deals with .php, .css, .js, .htm and .html files.

Download

To get the backup deletion script, cd to your project's directory and run the following wget command.

wget -N https://raw.githubusercontent.com/rapidwebltd/backup-deletion/master/backup-deletion.sh

Please note that you should download the script into a valid git repository. If you do not, it will refuse to run due to its destructive nature.

Usage

Run the ./backup-deletion.sh script from within your project's directory.

If you receive a Permission denied error, you need to make the script executable with chmod +x backup-deletion.sh.

License

MIT

backup-deletion's People

Contributors

divineomega avatar kirsty-gasston avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

backup-deletion's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.