diff options
| -rw-r--r-- | README.md | 55 |
1 files changed, 19 insertions, 36 deletions
@@ -7,52 +7,35 @@ combination with watch it can be used for continous monitoring. OPTIONS ======= -Call: dir\_monitor [[OPTIONS]... path\_to\_open] +Information can be found in the manpage or by calling the executable with `--help`. -| long | short | option | description | -| ---- | ----- | ------ | ----------- | -| `--help` | `-h` | | Show this message and exit | -| `--format` | `-f` | format | define columns to print, details below | -| `--long-timestamp` | `-t` | | Print timestamp in long form yyyymmdd HH:MM:SS ZONE | -| `--print-boxed` | `-b` | | Print visual additions around the table | -| `--print-header` | `-H` | | Print a header above the columns | -| `--reverse-sort` | | | | Sort reversed | -| `--show-hidden-entries` | `-a` | | Show hidden entries in the directory | -| `--sort-by` | | variant | Sort either by variant | -| `--time-field` | | `a`\|`c`\|`m` | Sort by (a)ccess, (c)hange or (m)odification time. Default: m | +BUILD +===== +`cmake -S .` -`--sort-by` variants: `name` | `size` | `time` +`make` +This will also build executables with debug options and create a manpage. +The latter requires `asciidoc`, `xmlto` and `gzip` for compression. -`--format` Aside from the characters in the table only space is -accepted. Currently at max 80 bytes of the format string are processed. -| char | description | -| ---- | ----------- | -| `A` | access time | -| `C` | change time | -| `G` | group name | -| `g` | group id | -| `M` | modification time | -| `n` | file name | -| `p` | permissions | -| `s` | size in bytes or kB (base 1024) | -| `T` | type (file, directory, link etc.) | -| `t` | time as defined by `--time-field` | -| `U` | user name | -| `u` | user id | - -The time stamps in `t`, `A`, `C`, `M` are by default only the daily time, -`--long-timestamp` / `-t` needs to be set to activate the full timestamp -including date and timezone. - TODO ==== - option for output file - option for recursion -- option for symlink handling -- configuration file in ${HOME}/.config/ ? +- configuration file in `${HOME}/.config/` ? (No from my side, KISS, but patches welcome) - formatting with non-ASCII characters in filenames, `--print-boxed` misformats due to the strlen result not matching the visual representation. +- repeat mode? The original intention was to write a small utility creating + output formatted in a form easy to be processed by the human eye/brain. + This program was intended to be handled by the watch command (or similar) + for active monitoring in a terminal. + A repeat mode in combination with an output file could be used for logging, + however this could also be done with a small shell script. If the output of + the whole loop in the script is redirected the amount of additional filesystem + related syscalls would be low. Of course if the redirection would be done + for each call and attached to the end of the target file much more would be + going on. + |
