3 ms·
Nice! This wins :) I had to modify it a bit to get it to work cross-platform, but the approach does appear to be sound: find . -maxdepth 1 -type f -print0
by chias 3y ago
Nice! This wins :)
I had to modify it a bit to get it to work cross-platform, but the approach does appear to be sound:
find . -maxdepth 1 -type f -print0 | tr -d -c '\000' | wc -c
I had originally written "Hint: it probably isn't what you think it is, if it's even possible", but after testing for a bit, I updated my comment in what was apparently a fit of hubris to say you couldn't.
- toast0 3y agoI had seen the original comment, but people are always telling me things can't be done, even though I can do them. :P