to find number of files in a directory of mac files without the mac cruft counted in, I tried:
Code:
find . -not \( -name ".?*" -prune \) -type f | wc -l
However the number returned is suspiciously high. So I'm thinking it may be counting files inside ".*" folders. On examining in a gui file browser (emelFM2) with hidden files displayed, I saw a number of files which do not fit the dot prefix pattern (see attached), so now I want to sweep them all up in one go, but struggling with the syntax:
Code:
find . -not \( -name ".?*, _?*, db_?*, lock, log?*, cnid?*" -prune \) -type f | wc -l
find . -not \( -name ".?*", "_?*", "db_?*", "lock", "log?*", "cnid?*" -prune \) -type f | wc -l
both fail, the first returning all files (so not filtering out any), the second returning a "paths must precede expression" error.
Anyone know how this should be put?