浏览代码

Plugin dups: find duplicate files in dir

master
Arun Prakash Jana 5 年前
父节点
当前提交
d8fe4b3bb6
找不到此签名对应的密钥 GPG 密钥 ID: A75979F35C080412
共有 4 个文件被更改,包括 24 次插入3 次删除
  1. +4
    -1
      README.md
  2. +3
    -2
      plugins/README.md
  3. +15
    -0
      plugins/dups
  4. +2
    -0
      plugins/imgur

+ 4
- 1
README.md 查看文件

@@ -15,7 +15,6 @@
<a href="https://travis-ci.org/jarun/nnn"><img src="https://img.shields.io/travis/jarun/nnn/master.svg?label=travis" alt="Travis Status" /></a>
<a href="https://circleci.com/gh/jarun/workflows/nnn"><img src="https://img.shields.io/circleci/project/github/jarun/nnn.svg?label=circleci" alt="CircleCI Status" /></a>
<a href="https://github.com/jarun/nnn/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-BSD%202--Clause-yellow.svg?maxAge=2592000" alt="License" /></a>
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RMLTQ76JSXJ4Q"><img src="https://img.shields.io/badge/PayPal-donate-1eb0fc.svg" alt="Donate via PayPal!" /></a>
</p>

<p align="center">
@@ -24,6 +23,10 @@

<p align="center"><i>Modes of nnn (light with filter, detail, du analyzer) with memory usage (click for a demo video)</i></a></p>

<p align="center">
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RMLTQ76JSXJ4Q"><img src="https://img.shields.io/badge/PayPal-donate-1eb0fc.svg" alt="Donate via PayPal!" /></a>
</p>

## Index

- [Introduction](#introduction)


+ 3
- 2
plugins/README.md 查看文件

@@ -5,6 +5,7 @@ The currently available plugins are listed below.
| Plugin (a-z) | Lang | Deps | Description |
| --- | --- | --- | --- |
| boom | sh | SMPlayer | Play random music from dir (modify `PLAYER`) |
| dups | sh | find, md5sum,<br>sort uniq xargs | List non-empty duplicate files in current directory |
| checksum | sh | md5sum,<br>sha256sum | Create and verify checksums |
| fzy-open | sh | fzy, xdg-open | Fuzzy find a file in dir subtree and edit or xdg-open |
| getplugs | sh | wget | Update plugins |
@@ -17,12 +18,12 @@ The currently available plugins are listed below.
| mocplay | sh | [moc](http://moc.daper.net/) | Appends (and plays, see script) selection/dir/file in moc|
| ndiff | sh | vimdiff | Diff for selection (limited to 2 for directories) |
| nmount | sh | pmount, udisks2 | Toggle mount status of a device as normal user |
| nwal | sh | nitrogen | Set the selected image as wallpaper using nitrogen |
| nwal | sh | nitrogen | Set image as wallpaper using nitrogen |
| organize | sh | file | Auto-organize files in directories by file type |
| pastebin | sh | [pastebinit](https://launchpad.net/pastebinit) | Paste contents of (text) file to paste.ubuntu.com |
| pdfview | sh | pdftotext/<br>mupdf-tools | View PDF file in `$PAGER` |
| picker | sh | nnn | Pick files and pipe the newline-separated list to another utility |
| pywal | sh | pywal | Set selected image as wallpaper, change terminal color scheme |
| pywal | sh | pywal | Set image as wallpaper, change terminal colorscheme |
| readit | sh | pdftotext, mpv,<br>pico2wave | Read a PDF or text file aloud |
| ringtone | sh | date, ffmpeg | Create a variable bitrate mp3 ringtone from file |
| splitjoin | sh | split, cat | Split file or join selection |


+ 15
- 0
plugins/dups 查看文件

@@ -0,0 +1,15 @@
#!/usr/bin/env sh

# Description: List non-empty duplicate files in the current directory (based on size followed by MD5)
#
# Source: https://www.commandlinefu.com/commands/view/3555/find-duplicate-files-based-on-size-first-then-md5-hash
#
# Requires: find md5sum sort uniq xargs
#
# Shell: POSIX compliant
# Author: syssyphus

find -size +0 -type f -printf "%s\n" | sort -rn | uniq -d | xargs -I{} -n1 find -type f -size {}c -print0 | xargs -0 md5sum | sort | uniq -w32 --all-repeated=separate

echo "Press any key to exit"
read dummy

+ 2
- 0
plugins/imgur 查看文件

@@ -583,3 +583,5 @@ done
if [ "${check_update}" = "true" ]; then
check_for_update
fi

read dummy

||||||
x
 
000:0
正在加载...
取消
保存