aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-08-30 19:59:46 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-08-30 20:01:13 +0530
commit3f40980dd03892c2225b89aa57530990c3074dfb (patch)
treefd14f0f8e049483ca550f087019372b8ac94fd86
parent94c3af873cf2aa46e2cb018412b8ce1e1609d30c (diff)
downloadnnn-3f40980dd03892c2225b89aa57530990c3074dfb.tar.gz
Plugin oldbigfile: find large files by access time
-rw-r--r--plugins/README.md1
-rwxr-xr-xplugins/oldbigfile16
2 files changed, 17 insertions, 0 deletions
diff --git a/plugins/README.md b/plugins/README.md
index 7a10a1c..91b9a17 100644
--- a/plugins/README.md
+++ b/plugins/README.md
@@ -20,6 +20,7 @@ The currently available plugins are listed below.
| 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 image as wallpaper using nitrogen |
+| oldbigfile | sh | find, sort | List large files by access time |
| 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` |
diff --git a/plugins/oldbigfile b/plugins/oldbigfile
new file mode 100755
index 0000000..4b17405
--- /dev/null
+++ b/plugins/oldbigfile
@@ -0,0 +1,16 @@
+#!/usr/bin/env sh
+
+# Description: List files bigger than input size by ascending access date.
+#
+# Requires: find sort
+#
+# Shell: POSIX compliant
+# Author: Arun Prakash Jana
+
+echo -n "Min file size (MB): "
+read size
+
+find -size +"$size"M -type f -printf '%A+ %s %p\n' | sort
+
+echo "Press any key to exit"
+read dummy