The output of the
file command is kind of irrelevant with regards to why the
file command sequence would fail.
Apart from the output from the orignal
find command, what is most interesting is what is the output from:
find . -name *.old -type f -mtime +7
if there are no file names echoed, then
compress will be called without arguments, therefore waiting for stdin. If there are spaces in the file names of the files found, then
xargs will have problems handing this over to compress as well.
You should at least try to change this into:
find . -name "*.old" -type f -mtime +7 -print0 | xargs -0 --no-run-if-empty compress -f
Updated based on the OP comment this would be:
find . -name "$FILE" -type f $ACTION_TYPE +$PARAM -print0 | xargs -0 --no-run-if-empty compress -f
find with the
-0 make sure filenames with spaces get properly passed to compress.
xargs from running
compress if no file is found at all.