AnotherAlan
Technical User
Hi All,
The below line works great on the server;
find ./ -ctime 0 -name 'DBload.*.log' | xargs ls -l | awk '$5>32000 {print $0}'
However, I've tried running this as part of a larger script from a central host, like this;
ssh -n servername "find /path/to/check -ctime 0 -name 'DBload.*.log' | xargs ls -l | awk '$5>32000 {print $0}'"
and I get awk syntax errors. If I drop the awk part it works, but then I have to use another statement to rid myself of files with sizes below 32000.
All help appreciated.
Alan
The below line works great on the server;
find ./ -ctime 0 -name 'DBload.*.log' | xargs ls -l | awk '$5>32000 {print $0}'
However, I've tried running this as part of a larger script from a central host, like this;
ssh -n servername "find /path/to/check -ctime 0 -name 'DBload.*.log' | xargs ls -l | awk '$5>32000 {print $0}'"
and I get awk syntax errors. If I drop the awk part it works, but then I have to use another statement to rid myself of files with sizes below 32000.
All help appreciated.
Alan