Factor out common code for writing ls shell command. Rework its length
[mmh] / test / tests / scan /
drwxr-xr-x   ..
-rw-r--r-- 903 test-scan