Thu 20 Apr 2017 03:40:47 PM UTC, original submission:
We run these commands:
Here=/etc
find "$Here" -perm /u=x,g=x,o=x -type f >/tmp/allbins
find "$Here" -perm /u=x,g=x,o=x -type f -ls >/tmp/allbins-ls
find "$Here" -print0 -perm /u=x,g=x,o=x -type f >/tmp/allbins-z
wc -l /tmp/allbins
wc -l /tmp/allbins-ls
cat /tmp/allbins-z | tr '\0' '\n' | wc -l
The output is:
$ sudo bash t.sh
101 /tmp/allbins
101 /tmp/allbins-ls
3779
.... So it looks like there are 3779 files listed when we ask for -print0.
A quiick perusal using : cat /tmp/allbins-z | tr '\0' '\n' shows:
/etc
/etc/fstab
/etc/crypttab
/etc/mtab
/etc/resolv.conf
/etc/fonts
/etc/fonts/conf.d
/etc/fonts/conf.d/65-0-lohit-tamil.conf
/etc/fonts/conf.d/59-liberation-mono.conf
/etc/fonts/conf.d/66-ucs-miscfixed.conf
/etc/fonts/conf.d/59-liberation-sans.conf
.. all of which are not type f or mode executable
This sure looks like a bug!
Regards,
George
|