I’am trying to execute and show the output of following command :
find /var/log/openhab2/ -type f -name ‘.’ -exec du -ch {} + | grep totalt$
this command will show the complete size of logfiles.
but all i get is some text that explaines how to format the find command
If i execute the command from the console, then i get
29M totalt
I tried to configure through Paper UI and manually.
Manually i have this in my items file:
String logSize “Log-størrelse: [%s MB]” (System) {exec="<[find /var/log/openhab2/ -type f -name ‘.’ -exec du -ch {} + | grep totalt$]"}
Looks overly complicated for what you’re trying to do, furthermore that command won’t differentiate between ‘29K’ ‘29M’ or ‘29G’, why not use this to get the figure in kilobytes: