Bug 53857

Summary: Undocumented escape sequence
Product: [Retired] Red Hat Linux Reporter: Chris Watt <cnww>
Component: findutilsAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact: Aaron Brown <abrown>
Severity: low Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-02-12 12:54:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Here is the patch I sent. none

Description Chris Watt 2001-09-20 01:52:34 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.78 [en] (Win98; U)

Description of problem:
Find manual lists escape sequences for -printf _not_ including "\0" or any 
reference to an escape in the form \<number>, and states:
"A `\' character followed by any other character is treated  as  an  
ordinary character, so they both are printed."

In reality a "\0" fed to find at a command line does not (as it should) 
produce the text "\0" in the printed output. Instead it produces an ASCII 
null character.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.find . -type f -printf "\"%p\"\0"
2.
3.
	

Actual Results:  Find outputs a list of filenames each terminated with an 
ASCII null character. This is easily verified by:
find . -type f -printf "\"%p\"\0" | tr "\0" "N"

Expected Results:  Find should (according to the docs) output a list of 
filenames each terminated with a literal "\0" string.

Additional info:

This is more of an undocumented feature really than a bug. Actually it 
will come in handy if it's consistant accross versions/platforms.

Comment 1 Tim Waugh 2001-12-18 17:15:52 UTC
I've reported this upstream.


Comment 2 Tim Waugh 2001-12-18 17:16:24 UTC
Created attachment 40947 [details]
Here is the patch I sent.

Comment 3 Tim Waugh 2002-02-13 14:08:34 UTC
No response from maintainer.  Oh well, patch applied in findutils-4.1.7-3.