3 ms·
Nice! I though for a minute about using find, but I didn't know about those options to stat, and I just punted and used ls. I need to study the stat man page,
by rootbear 12y ago
Nice! I though for a minute about using find, but I didn't know about those options to stat, and I just punted and used ls. I need to study the stat man page, apparently.
- babarock 12y agoYou kinda alluded to it, but I'm going to leave this here for reference. Here's a good explanation of why you should avoid parsing the output of `ls`: http://mywiki.wooledge.org/ParsingLs http://mywiki.wooledge.org/ParsingLs
- Erwin 12y agofind (or maybe just GNU find) has the equivalent of stat built in so you can even do: find -printf "%u %g\n"|sort|uniq -c