Re: GNU find: "print0" and "-type" arguments

2012-08-03 Thread Bob Proulx
Martin Steigerwald wrote: > Bob Proulx: > > Martin Steigerwald wrote: > > > martin@merkaba:~/Zeit/find-Test> find \( -type d -print \) -o \( > > > -name "file" -printf "%s %p" \) -o \( -name "anotherfile" -print0 > > > \) . > > > ./anotherfile./dir > > > 0 ./file% > > > martin@merkaba:~/Zeit/find-

Re: GNU find: "print0" and "-type" arguments

2012-08-03 Thread Martin Steigerwald
Am Freitag, 3. August 2012 schrieb Bob Proulx: > Martin Steigerwald wrote: > > martin@merkaba:~/Zeit/find-Test> find \( -type d -print \) -o \( > > -name "file" -printf "%s %p" \) -o \( -name "anotherfile" -print0 > > \) . > > ./anotherfile./dir > > 0 ./file% > > martin@merkaba:~/Zeit/find-Test> >

Re: GNU find: "print0" and "-type" arguments

2012-08-02 Thread Bob Proulx
Martin Steigerwald wrote: > martin@merkaba:~/Zeit/find-Test> find \( -type d -print \) -o \( -name "file" > -printf "%s %p" \) -o \( -name "anotherfile" -print0 \) > . > ./anotherfile./dir > 0 ./file% >

Re: GNU find: "print0" and "-type" arguments

2012-08-02 Thread Martin Steigerwald
Hi! Bill Unruh allowed me to post his personal answer to the list. He answered personally cause otherwise he would get the whole mailing list in the mail instead due to some newsgroup gateway stuff. On Thursday, 2. August 2012 he wrote: > In linux.debian.user, you wrote: > > Am Donnerstag, 2. A

Re: GNU find: "print0" and "-type" arguments

2012-08-02 Thread Martin Steigerwald
Am Donnerstag, 2. August 2012 schrieb Bob Proulx: > > I see (on a terminal screen that does not display null characters): > > ../dir./file > > You have the order of arguments backwards. You wanted to say this: > > find -type d -print > > That would do the right thing. Doing it the other way

Re: GNU find: "print0" and "-type" arguments

2012-08-02 Thread Kumar Appaiah
On Wed, Aug 01, 2012 at 09:12:49PM -0500, Alex Robbins wrote: > >Kumar > Yes, I read the man page and I know what the -print0 option is > supposed to do. Notice, however, that when I executed "find > -print0 -type d" the output (which, we both understand, is delimited > by null characters) include

Re: GNU find: "print0" and "-type" arguments

2012-08-02 Thread Slavko
Hi, Dňa Wed, 01 Aug 2012 19:33:35 -0500 Alex Robbins napísal: > I see (on a terminal screen that does not display null characters): > ../dir./file simple try to switch the arguments: find -type d -print0 ../dir The print0 and others are the "expressions" (see man find) and they must be at end

Re: GNU find: "print0" and "-type" arguments

2012-08-01 Thread Bob Proulx
Alex Robbins wrote: > I have a directory that looks like this: > . > ├── dir > └── file > "dir" is a directory and "file" is a regular file. I execute: > find -type d Here you are using the GNU find extension which allows the path to be omitted. In GNU find the path is optional. In the standar

Re: GNU find: "print0" and "-type" arguments

2012-08-01 Thread kushal . kumaran+debian
Alex Robbins wrote: >I have a directory that looks like this: >. >├── dir >└── file >"dir" is a directory and "file" is a regular file. I execute: >find -type d >and get the output: >. >./dir >This is the expected output. However, when I execute: >find -print0 -type d >I see (on a terminal scre

Re: GNU find: "print0" and "-type" arguments

2012-08-01 Thread Alex Robbins
On 08/01/2012 08:41 PM, Kumar Appaiah wrote: On Wed, Aug 01, 2012 at 07:33:35PM -0500, Alex Robbins wrote: . ./dir This is the expected output. However, when I execute: find -print0 -type d I see (on a terminal screen that does not display null characters): ../dir./file The same goes for using

Re: GNU find: "print0" and "-type" arguments

2012-08-01 Thread Kumar Appaiah
On Wed, Aug 01, 2012 at 07:33:35PM -0500, Alex Robbins wrote: > . > ./dir > This is the expected output. However, when I execute: > find -print0 -type d > I see (on a terminal screen that does not display null characters): > ../dir./file > > The same goes for using "-type f". It appears as thoug

GNU find: "print0" and "-type" arguments

2012-08-01 Thread Alex Robbins
I have a directory that looks like this: . ├── dir └── file "dir" is a directory and "file" is a regular file. I execute: find -type d and get the output: . ./dir This is the expected output. However, when I execute: find -print0 -type d I see (on a terminal screen that does not display null cha