Giter Club home page Giter Club logo

filerepeatcheck's Introduction

fileRepeatCheck

my email: bjzhush#gmail.com

a simple repeat file check and uniq script

1.检查重复文件,显示结果或只输出供去重的结果 UniqFile.php 共3个参数, -dir为必须,需要指定要检查的路径 -hash 默认为true,即通过文件头100000个字符的md5 hash进行文件唯一性的对比,若指定为false,则通过文件size检查 -showdel 默认为false,若指定为true,则将所有重复的文件去除每组第一个,然后全部打印出来(已做了对空格的转义)

建议使用sudo权限执行,避免无权限访问的情况(虽然对于权限拒绝也做了判断和记录)

usage: php UniqFile.php -dir=/your/path [-hash=false] [-showdel=true] [-ext=null/txt/php] 可以指定只在某些扩展名的文件内进行比较,多个扩展名以/分隔开

2.去重程序 可用 /usr/bin/php UniqFile.php -dir=/your/path/ -showdel=true >todel.txt 然后bash delFilesReadFromFile.sh 输入todel.txt 交给rm进行删除 注意在你使用这个脚本之前,确定你非常清楚并且你肯定你要删除的这些文件没有问题 !!!!!!!!!!

filerepeatcheck's People

Contributors

bjzhush avatar

Watchers

 avatar

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.