I have a few files in a directory with names similar to
_system1.log_system2.log_system3.logother.log
but they are not created in that order.
Is there a simple, non-hardcoded, way to cat the files starting with the underscore in date order?
I have a few files in a directory with names similar to
_system1.log_system2.log_system3.logother.logbut they are not created in that order.
Is there a simple, non-hardcoded, way to cat the files starting with the underscore in date order?
Quick 'n' dirty:
cat `ls -t _system*.log`
Safer:
ls -1t _system*.log | xargs -d'\n' cat