Right now I am using
ls -lt /my/directory (see below) then php parses the output. But inconsistently because the delimiter is space and there might be two or more spaces in between two fields.
The solution is output only file name and its size. How can I list files (using wild card) and its full size in command line?
So instead of
-rw------- 1 db2inst1 db2iadm1 855658496 Apr 22 02:31 MONTE.0.db2inst1.NODE0000.CATN0000.20120422023005.001