4 ms·
Wouldn't 'find .. -exec ' and friends get you this? find . -type f -depth 1 -exec ls -la {} + | awk {'print "file="$9 " user=" $3 " group=" $4 " size=" $5'
by eternalban 4y ago
Wouldn't 'find .. -exec ' and friends get you this?
find . -type f -depth 1 -exec ls -la {} + | awk {'print "file="$9 " user=" $3 " group=" $4 " size=" $5'}
- kazinator 4y agoYour awk has to put out file="..." notation, and if double quotes occur, they have to be escaped. So you're looking at substantially longer command. | awk 'function esc(str) { ... } { print "file=\"" esc($9) " user=\"" ... }'