I'm developing a Bash script which cleans up old data files periodically, and right now everything works except for the log file I'm trying to generate so I can see what it did.
The structure I'm using is (sorry for the variables):
find $datfold -maxdepth 1 -type f -name "$month-*-data.dat" -printf "%f\n" | xargs tar -czvf $month-data.tar.gz >> $log
The tar.gz part is working fine, it's just not sending any output to the $log file. What am I missing?
0 Answers