about summary refs log tree commit diff
path: root/README.md
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2015-10-27 14:03:16 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2015-10-27 14:03:16 +0100
commit0597d142accd2de563f8fcc152c48c5b0ea6a530 (patch)
treea00f13fc16bdec5d4e1871338ef6e8192f6a2297 /README.md
parent2844618b1216fe6210f1a9773a2804b65a439587 (diff)
downloadlr-0597d142accd2de563f8fcc152c48c5b0ea6a530.tar.gz
lr-0597d142accd2de563f8fcc152c48c5b0ea6a530.tar.xz
lr-0597d142accd2de563f8fcc152c48c5b0ea6a530.zip
README.md: add some examples
Diffstat (limited to 'README.md')
-rw-r--r--README.md85
1 files changed, 85 insertions, 0 deletions
diff --git a/README.md b/README.md
index 5469c63..e34558c 100644
--- a/README.md
+++ b/README.md
@@ -156,6 +156,91 @@ The following features won't be implemented:
   (or even better [xa](https://github.com/chneukirchen/xa)).
 * columns: use `column`, `git-column`, Plan 9 `mc`.
 
+## "Screenshots"
+
+Default output, sorted by name:
+
+```
+% lr
+./
+.git/
+.git/HEAD
+.git/config
+[...]
+Makefile
+README.md
+lr.c
+```
+
+Long output format:
+
+```
+% lr -l
+drwxrwxr-x 3 chris users   120 2015-10-27 13:56 ./
+drwxrwxr-x 7 chris users   240 2015-10-27 13:56 .git/
+-rw-rw-r-- 1 chris users    23 2015-10-27 13:56 .git/HEAD
+-rw-rw-r-- 1 chris users   257 2015-10-27 13:56 .git/config
+[...]
+-rw-rw-r-- 1 chris users   297 2015-10-27 13:56 Makefile
+-rw-rw-r-- 1 chris users  5828 2015-10-27 13:56 README.md
+-rw-rw-r-- 1 chris users 27589 2015-10-27 13:56 lr.c
+```
+
+Simple test:
+
+```
+% lr -t 'type == d'
+./
+.git/
+.git/hooks/
+.git/info/
+.git/logs/
+.git/logs/refs/
+.git/logs/refs/heads/
+.git/logs/refs/remotes/
+.git/logs/refs/remotes/origin/
+.git/objects/
+.git/objects/info/
+.git/objects/pack/
+.git/refs/
+.git/refs/heads/
+.git/refs/remotes/
+.git/refs/remotes/origin/
+.git/refs/tags/
+```
+
+List regular files by size, largest first:
+
+```
+% lr -f '%S %f\n' -1 -t 'type == f' -oS
+  27K lr.c
+ 5.7K README.md
+  297 Makefile
+```
+
+List directory total sizes, indented:
+
+```
+% lr -D -t 'type == d' -f '%I%I%t %p\n'
+172 .
+  132 .git
+    40 .git/hooks
+    4 .git/info
+    12 .git/logs
+      8 .git/logs/refs
+        4 .git/logs/refs/heads
+        4 .git/logs/refs/remotes
+          4 .git/logs/refs/remotes/origin
+    48 .git/objects
+      0 .git/objects/info
+      48 .git/objects/pack
+    8 .git/refs
+      4 .git/refs/heads
+      4 .git/refs/remotes
+        4 .git/refs/remotes/origin
+      0 .git/refs/tags
+```
+
 ## Installation
 
 Use `make all` to build, `make install` to install relative to `PREFIX`