aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/oldbigfile
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 /plugins/oldbigfile
parent94c3af873cf2aa46e2cb018412b8ce1e1609d30c (diff)
downloadnnn-3f40980dd03892c2225b89aa57530990c3074dfb.tar.gz
Plugin oldbigfile: find large files by access time
Diffstat (limited to 'plugins/oldbigfile')
-rwxr-xr-xplugins/oldbigfile16
1 files changed, 16 insertions, 0 deletions
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