data-stats command error
- moosh version: 0.37
- moodle version: 310
- database: PostgreSQL
- php version: 7.4.15
- operating system: FreeBSD 12.2
Actual behaviour
% moosh data-stats du: invalid option -- b usage: du [-Aclnx] [-H | -L | -P] [-g | -h | -k | -m] [-a | -s | -d depth] [-B blocksize] [-I mask] [-t threshold] [file ...] Couldn't find dataroot directory
Expected behaviour
% moosh data-stats dataroot: 112.1KB filedir: 89.9KB files total: 28.6MB distinct files total: 28.6MB Course 1 id: id 3 Course 1 files total: 2.1MB ...
Steps to reproduce
moosh data-stats
Note
FreeBSD's du command doesn't have -b flag if i change the "du -bs" commands in the lines belove with "du -s -B 1" the error is gone du -s -B 1 command runs both on Linux and FreeBSD
https://github.com/tmuras/moosh/blob/master/Moosh/Command/Moodle31/Report/DataStats.php#L27 https://github.com/tmuras/moosh/blob/master/Moosh/Command/Moodle31/Report/DataStats.php#L31
Cheers