Unix/Linux Go Back    


Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

Description of the option print0 in the command find (man page)

Shell Programming and Scripting


Tags
bash, find, solved

Reply    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 12-17-2017   -   Original Discussion by puertas12
puertas12's Unix or Linux Image
puertas12 puertas12 is offline
Registered User
 
Join Date: Oct 2017
Last Activity: 5 January 2018, 3:49 PM EST
Posts: 8
Thanks: 1
Thanked 2 Times in 2 Posts
Description of the option print0 in the command find (man page)

This is the description of the option -print0 fon the command find in the man page:
Quote:
-print0:
True; print the full file name on the standard output, followed by a null character (instead of the newline character that -print uses). This allows file names that contain newlines or other types of white space to be correctly interpreted by programs that process the find output. This option corresponds to the -0 option of xargs
What does the "True" in the first line of the description mean?

Last edited by puertas12; 12-17-2017 at 02:17 PM.. Reason: grammar
The Following User Says Thank You to puertas12 For This Useful Post:
dodona (4 Weeks Ago)
Sponsored Links
    #2  
Old Unix and Linux 12-17-2017   -   Original Discussion by puertas12
jim mcnamara's Unix or Linux Image
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 15 January 2018, 9:34 AM EST
Location: NM
Posts: 11,284
Thanks: 581
Thanked 1,127 Times in 1,038 Posts
These kinds of options can be either true or false. False means 'skip this file' because it fails to meet the other options requirements like age, file type... true means it doesn't change any other true/false evaluation that might have occurred on the file and if it is the only option it will always print.
Sponsored Links
    #3  
Old Unix and Linux 4 Weeks Ago   -   Original Discussion by puertas12
MadeInGermany's Unix or Linux Image
MadeInGermany MadeInGermany is offline Forum Staff  
Moderator
 
Join Date: May 2012
Last Activity: 21 January 2018, 9:24 PM EST
Location: Simplicity
Posts: 3,947
Thanks: 335
Thanked 1,322 Times in 1,192 Posts
'False' would skip a following condition (that follows immediately or after a -a).
Example:


Code:
... -print0 -exec echo hello {} \;

The 'hello' is always done.
    #4  
Old Unix and Linux 4 Weeks Ago   -   Original Discussion by puertas12
dodona's Unix or Linux Image
dodona dodona is offline
Registered User
 
Join Date: Jun 2012
Last Activity: 20 January 2018, 3:41 AM EST
Posts: 17
Thanks: 52
Thanked 2 Times in 2 Posts
Quote:
Originally Posted by puertas12 View Post
This is the description of the option -print0 fon the command find in the man page:


What does the "True" in the first line of the description mean?
guess it simply means that the option is set.
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Unix man command to find out month of the year? janetroop95 UNIX for Dummies Questions & Answers 2 08-30-2012 01:28 PM
man page question fugitive Solaris 2 05-14-2009 11:22 PM
Creating a Man page for a command raghu.amilineni Solaris 2 12-21-2008 05:02 PM
Unable to get help from man page ezsurf Solaris 8 12-11-2007 01:03 PM
man page issue praveenkumar_l UNIX for Advanced & Expert Users 4 06-08-2007 03:20 AM



All times are GMT -4. The time now is 12:43 AM.