aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Töpper <atsutane@freethoughts.de>2025-07-08 23:40:24 +0200
committerThorsten Töpper <atsutane@freethoughts.de>2025-07-08 23:40:24 +0200
commit0d5141bbdd20f02c796365453581a4849debeca5 (patch)
tree2265c6ae6c6235eb2caf5ab14a0339b6a463db21
parent82ed011a0b9f812ab54e121d72121f5e85e46fc2 (diff)
downloaddir_monitor-0d5141bbdd20f02c796365453581a4849debeca5.tar.gz
dir_monitor-0d5141bbdd20f02c796365453581a4849debeca5.tar.bz2
Minor non-functional changes
-rw-r--r--README.md10
-rw-r--r--src/data_management.c4
2 files changed, 10 insertions, 4 deletions
diff --git a/README.md b/README.md
index 0741634..f800ed5 100644
--- a/README.md
+++ b/README.md
@@ -37,12 +37,15 @@ accepted. Currently at max 80 bytes of the format string are processed.
| `M` | modification time |
| `n` | file name |
| `p` | permissions |
-| `s` | size |
-| `T` | type |
-| `t` | time defined by `--time-field` |
+| `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
====
@@ -52,3 +55,4 @@ TODO
- option with lowest priority: nice formatting, do the whole formatting in
memory and based on the length information gathered put it into a visual
table.
+- configuration file in ${HOME}/.config/ ?
diff --git a/src/data_management.c b/src/data_management.c
index eec36ce..e27b9cd 100644
--- a/src/data_management.c
+++ b/src/data_management.c
@@ -102,6 +102,7 @@ inline int insert_sorted_by_size(struct list_head *list, struct list_node *node)
return -3;
}
+
inline int insert_sorted_by_time(struct list_head *list, struct list_node *node) {
if (list == NULL) { LOGERR("ERROR: No list given.\n"); return -1; }
if (node == NULL) { LOGERR("ERROR: No node given.\n"); return -2; }
@@ -192,6 +193,7 @@ inline struct list_head *create_list_sort_reversed(struct list_head *list) {
return lh;
}
+
/* This function contains the only time critical code. The loop over
* the directory content.
*/
@@ -255,7 +257,7 @@ struct list_head *get_data_from_directory(char *path) {
free(fullpath);
closedir(dir);
- DBGTRC("Finished reading data from directory\n");
+ DBGTRC("DEBUG: Finished reading data from directory\n");
while (lnstack != NULL) {
tmp = lnstack;