diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-07-01 11:15:48 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-07-01 11:15:48 +1200 |
commit | f932baa3120c11e98181aff1db715e98d852c141 (patch) | |
tree | 4bcde5045d32228b70e6df371069311e532c8407 | |
parent | Run gscr(1) in subshell (diff) | |
download | dotfiles-f932baa3120c11e98181aff1db715e98d852c141.tar.gz dotfiles-f932baa3120c11e98181aff1db715e98d852c141.zip |
Add dub(1)
-rw-r--r-- | README.markdown | 1 | ||||
-rwxr-xr-x | bin/dub | 6 | ||||
-rw-r--r-- | man/man1/dub.1 | 19 |
3 files changed, 26 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown index 0f42d03b..21c88166 100644 --- a/README.markdown +++ b/README.markdown @@ -297,6 +297,7 @@ Installed by the `install-bin` target: * `urlc(1)` accepts a list of URLs on `stdin` and writes error messages to `stderr` if any of the URLs are broken, redirecting, or are insecure and have working secure versions; requires `curl(1)` +* `dub(1)` lists the biggest entries in a directory. * `edda(1)` provides a means to run `ed(1)` over a set of files preserving any options, mostly useful for scripts. * `fgscr(1)` finds Git repositories in a directory root and scrubs them with diff --git a/bin/dub b/bin/dub new file mode 100755 index 00000000..94653b77 --- /dev/null +++ b/bin/dub @@ -0,0 +1,6 @@ +#!/bin/sh +# List the biggest files in a directory +cd -- "${1:-.}" || exit +du -bs -- * | +sort -k1 -nr | +sed "${2:-10}"q diff --git a/man/man1/dub.1 b/man/man1/dub.1 new file mode 100644 index 00000000..4086193a --- /dev/null +++ b/man/man1/dub.1 @@ -0,0 +1,19 @@ +.TH DUB 1 "July 2016" "Manual page for dub" +.SH NAME +.B dub +\- list the biggest files in the given directory +.SH SYNOPSIS +.B dub +.br +.B dub /path +.br +.B dub /path 20 +.SH DESCRIPTION +.B dub +lists the biggest entries in a given directory, defaulting to the current +directory. It defaults to printing 10 entries unless a second argument is +given. +.SH SEE ALSO +du(1) +.SH AUTHOR +Tom Ryder <tom@sanctum.geek.nz> |