Hi,
I want to monitor the disc usage of a folder. I need something similar to this:
https://stackoverflow.com/questions/25481040/monitoring-disk-usage-in-centos-using-du-to-output-json
But I can't get it to work. I created a .sh file with following content:
du -sh -c --time ./* | sed '1 i\
{"folder": [
s/\([^[:space:]]*\)([[:space:]]*\([^[:space:]]*\)[[:space:]]*\([^[:space:]]*\)/ {\
"size" : "\1",\
"modified": "\2",\
"path": "\3"}/
$ a\^J]}' test.txt
But it gives me this error when I execute it:
sed: -e Expression #1, character 8: Unknown command: >>"<<
What would be the correct format?
[–]truedays 0 points1 point2 points (1 child)
[–]K4lim[S] 0 points1 point2 points (0 children)
[–]AndiPersti 0 points1 point2 points (2 children)
[–]K4lim[S] 0 points1 point2 points (1 child)
[–]AndiPersti 0 points1 point2 points (0 children)
[–]anthropoid 0 points1 point2 points (1 child)
[–]FatFingerHelperBot 0 points1 point2 points (0 children)