[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #50835] -print0 causes all files to be output
From: |
George Gonzalez |
Subject: |
[bug #50835] -print0 causes all files to be output |
Date: |
Thu, 20 Apr 2017 11:40:48 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36 |
URL:
<http://savannah.gnu.org/bugs/?50835>
Summary: -print0 causes all files to be output
Project: findutils
Submitted by: ggonzalez
Submitted on: Thu 20 Apr 2017 03:40:47 PM UTC
Category: find
Severity: 3 - Normal
Item Group: Wrong result
Status: None
Privacy: Public
Assigned to: None
Originator Name: ggonzalez
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 4.5.11
Fixed Release: None
_______________________________________________________
Details:
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
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?50835>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #50835] -print0 causes all files to be output,
George Gonzalez <=