After patching I am trying to reduce inodes at /var directory due the sudoer activity logging. I use tar command for archiving the subfolders into 1 file by below command but failing to untar the folder during testing.
The command what already have tried:
for i in $(ls -d /var/log/sudo-io/*); do tar -cvJf $i.xz /var/log/sudo-io ; <rm -rf $i; > done
I would like to except only xz files at sudo-io folder, and archiving subfolders by automated bash command (cron, ...) to reduce the number of inodes.
Thanks in advance!