[net.unix] find

jejones@ea.UUCP (06/21/84)

#N:ea:13400004:000:445
ea!jejones    Jun 20 17:42:00 1984

Perhaps this should go in net.games.trivia (gee, I wonder if there
should be a net.unix.trivia? :->), but it's undocumented and I seem
to have gotten the following result by experimentation: the

	-ok cmd

option in find(1) seems to return true if you reply with "n" (actually,
anything other than "y"). I don't know whether there's any reason to
prefer one choice over the other, but maybe it will come in handy for
someone.

						James Jones

jejones@ea.UUCP (06/21/84)

#R:ea:13400004:ea:13400005:000:241
ea!jejones    Jun 21 08:36:00 1984

Please excuse me while I lapse into correctness: an "n" (non-"y")
response to -ok cmd in find is taken as implying false. I did the
wrong experiment to find out--at least now somebody has mentioned
this property in public.

					James Jones

chris@umcp-cs.UUCP (06/25/84)

``ok'' is intended to be used for interactive command execution.
For example,

	find . -name \*.o -ok rm {} \;

will print out the name of each ``found'' .o file and wait for
an answer.  ``y'' will allow rm to remove the file; ``n'' will
make find go on to the next .o, if any.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci (301) 454-7690
UUCP:	{seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet:	chris@umcp-cs		ARPA:	chris@maryland