Re: [Non-DoD Source] Re: Please advise work around or bug fix

2021-03-26 Thread Bob Proulx
Bob Proulx wrote: > Then I would use this following technique since it effectively exactly > answers the question you asked. Try this: > > find . -size +1k -exec sh -c 'ls -1sd "$@"' sh {} + Berny asked me why I chose to do it that way instead of the s

Re: [Non-DoD Source] Re: Please advise work around or bug fix

2021-03-25 Thread Bob Proulx
Yuen, Kam-Kuen CIV USARMY DEVCOM SC (USA) wrote: > But I try the following and has the attached sample output. > > find . -size +1k -ls > > Q) Where can I find the columns heading? The standard ls command does not > have the first two columns data. > Is there a good documentation that I can

Re: Please advise work around or bug fix

2021-03-24 Thread Bob Proulx
Yuen, Kam-Kuen CIV USARMY DEVCOM SC (USA) via Bug reports for the GNU find utilities wrote: > I am running the following command and the "ls" command gives error > message that the file cannot be found. The problem is that the > filename has spaces as part of the filename. In addition to everyth

Re: find improvement wish

2021-02-07 Thread Bob Proulx
Chun Yip Wong wrote: > I prefer using find with script in this way: find $dir $pattern.where > pattern=" -name *.sh ! -name *.txt ... etc." There is a problem with insufficiently quoted shell file glob meta characters in that pattern. That's a problem unrelated to find. > The built findutils ver

[bug #55095] please add "--count" to find

2018-11-25 Thread Bob Proulx
Follow-up Comment #2, bug #55095 (project findutils): This would be counter to the Unix philosophy of small programs that do one thing well that can be combined together to perform new useful things. This is just one example of something that is unpredictably needed but can be created as needed u

Re: find -print output escaping not documented?

2014-01-11 Thread Bob Proulx
James Youngman wrote: > Bob Proulx wrote: > > If stdout is a tty then the newline is mapped to '?'. But it isn't > > mapped if the output is redirected to a pipe or a file. This applies > > to the printf %p format too. > > Yes. This is delib

find -print output escaping not documented?

2014-01-10 Thread Bob Proulx
Undocumented behavior. Here is the test case: mkdir /tmp/testdir mkdir /tmp/testdir/"newline newline" find /tmp/testdir -print /tmp/testdir /tmp/testdir/newline?newline Note the '?' in the above. No '?' in the below that is redirected. find /tmp/testdir -print | head /tmp/testdir /tmp/testdir

Re: find - avoiding subtrees & Permission denied messages

2010-10-19 Thread Bob Proulx
Kevin Buchs wrote: > I often find myself wanting to use find, but avoid searching any > subdirectories called .snapshot, which contain our hourly online backups. > My attempt below seems to fail, for find is trying to access subdirectories > of .snapshot, for which I have no permission and I get th

Re: Interpretation of locate -r in various locate implementations

2008-04-05 Thread Bob Proulx
James Youngman wrote: > I understand that "locate -r" works differently between GNU locate on > the one hand, and both mlocate and slocate on the other. GNU > locate uses Emacs-dialect regular expressions. Both mlocate and > slocate use POSIX BREs. That does seem to be a gratuitous differenc

Re: Finding shallowest instance of $foo in a given structure

2008-03-19 Thread Bob Proulx
RB wrote: > > Would the two of you be able to be able to pull this into a > > (what-I-wanted-to-achieve, command, explanation-of-how-it-works) form > > so that we can put it into the Texinfo documenation? (And, length > > permitting, the manual page). > > Never done a Texinfo doc, but no bet

Re: Finding shallowest instance of $foo in a given structure

2008-03-19 Thread Bob Proulx
RB wrote: > > Using the above test case the following seems to work. > > > > find srcdir \( -exec test -d {}/CVS \; -o -exec test -d {}/.svn \; -o > > -exec test -d {}/.git \; \) -print -prune | sort > > That works for me as well; I knew I had to be a few sandwiches short! > It also has the add

Re: Finding shallowest instance of $foo in a given structure

2008-03-18 Thread Bob Proulx
RB wrote: > In short, I'm looking for a clean way to find the shallowest 'CVS', > '.svn', or what have you in a given directory structure without > ignoring sibling directories. If a project publishes multiple trees > (trunk, branch, etc.) with no common VCS parent, it's difficult to > cleanly cat

Re: updatedb: Spaces in {local,prune,net}paths

2007-08-22 Thread Bob Proulx
James Youngman wrote: > James Youngman wrote: > > [EMAIL PROTECTED] wrote: > > > AFAICS there's no way to have directory names with spaces in the > > > mentioned paths. > > > > > > Shall we define one? > > > > I'm generally in favour. > ... > Pinging bug-findutils members for any comments I am

Re: On the use of 0 or NULL, the discussion continues...

2007-06-28 Thread Bob Proulx
Eric Blake wrote: > #include > int main() > { > return execl("ls", "Makefile", 0); > } Use of 'execl' is a good point. It is not possible to prototype that function such that an integer zero can be known by a standard compiler as a pointer and so get automatic conversion into a pointer type.

On the use of 0 or NULL, the discussion continues...

2007-06-26 Thread Bob Proulx
Since this is not about any particular patch to findutils I have moved the discussion. http://lists.gnu.org/archive/html/findutils-patches/2007-06/msg00034.html Eric Blake-1 wrote: > But that is bug-prone. > > Consider: > > printf("%p%d", NULL, 1); > vs. > printf("%p%d", 0, 1); You make a co

Re: [Findutils-patches] [PATCH 1/2] Explain that before reporting a problem, you should try the current

2007-06-23 Thread Bob Proulx
James Youngman wrote: > I tried doing this automatically with > git-config --add format.headers '"To: [EMAIL PROTECTED]"' I think there are one too many sets of quotes there. > ... but that made git-format-patch add the To: header in between the > start of the Subject: header and its continuation

[bug #20245] bad variable substitution?

2007-06-23 Thread Bob Proulx
Update of bug #20245 (project findutils): Assigned to:None => rwp Open/Closed:Open => Closed ___ Follow-up Comment #1: The problem you

Re: [Findutils-patches] [PATCH 1/2] Explain that before reporting a problem, you should try the current

2007-06-23 Thread Bob Proulx
James Youngman wrote: > Eric Blake wrote: > >Say, do you have your git repository published somewhere? Is it worth > >getting it added to git.sv.gnu.org/gitweb? > > Yes and no. There is a public repo, but it's downstream of CVS. Being an advocate for git I thought I would mention here that it

Re: delayed list messages (Re: [4.3 PATCH] locate fails when run as root)

2007-01-19 Thread Bob Proulx
Nix wrote: > btw, I wonder what's up with the interestingly named list > [EMAIL PROTECTED] It seems to have received a single > legitimate message at list creation and then become a pure spam > mine...) That is pretty funny. The mailing list information for it says: "Temporary test list for exci

delayed list messages (Re: [4.3 PATCH] locate fails when run as root)

2007-01-19 Thread Bob Proulx
James Youngman wrote: > Nix wrote: > > [This is a 3rd resend, since repeated attempts to send this to to > > bug-findutils@gnu.org have failed; the email vanished without trace; > > maybe they're stuck in a moderation queue somewhere, but maybe they're > > lost. Apologies if they turn up after I se

Re: Find Command

2007-01-11 Thread Bob Proulx
On Mon, 18 Dec 2006 22:05:17 +0900 aforce ma wrote: > When I try to use the command belows to delete empty > directories,there always comes error messages,however the empty > directory has been deleted already,Is this a Bug? or how can I do to > make the error do not come? > > find -type d -empty

Re: [bug #18430] Problem with solving '{}' brackets

2006-12-05 Thread Bob Proulx
James Youngman wrote: > Bob Proulx wrote: > > find . -name "foo*" -exec sh -c "file {} >{}.tmp" \; > [...] > >What problem should I be aware of in the above? > > touch '/tmp/foo; echo foo: empty; rm -rf $HOME' Yep. That would do it. For

Re: [bug #18430] Problem with solving '{}' brackets

2006-12-03 Thread Bob Proulx
James Youngman wrote: > While "-exec sh ..." would change this behaviour, don't do that as it is > very insecure. Insecure? In what way? I envision something like this: find . -name "foo*" -exec sh -c "file {} >{}.tmp" \; Of course running this repeatedly is a problem unless it gets more co

Re: find printing full paths

2006-06-15 Thread Bob Proulx
The Wanderer wrote: > What I was doing at the time, so far as I remember, was: > > for i in `ls path/to/directory1/ path/to/directory2/` ; do ls -l $i && > $i ; done > > but that didn't work because the filename printed by the subshell did > not exist in the present directory. Would this have

find printing full paths (was: filutils 4.1)

2006-06-15 Thread Bob Proulx
James Youngman wrote: > The Wanderer wrote: > >For the little it's worth, I also find myself wanting to do something > >like this from time to time, usually in a context in which find is not a > >satisfactory alternative - or, at best, in which it would be awkward and > >potentially difficult to co

Re: bug in FIND: argument list too damn long using -exec chmod 440 {} +

2006-03-29 Thread Bob Proulx
James Youngman wrote: > Bob Proulx <[EMAIL PROTECTED]> wrote: > > Subject: bug in FIND: argument list too damn long using -exec chmod 440 > > {} + > > > > But that should not suffer from an argument list too long problem. > > The command is being execute

Re: problem with updatedb

2006-03-27 Thread Bob Proulx
Gabriel Petit N. wrote: > I'm trying to updatedb but always says: "updatedb: new database would be > empty" > I'm using debian from a knoppix hd installation, kernel 2.6.15.2 (it > happens with any kernel). Thank you for your report. Note that Knoppix is not really Debian. It has a basis in Deb

Re: bug in FIND: argument list too damn long using -exec chmod 440 {} +

2006-03-27 Thread Bob Proulx
D Antryg M Revok wrote: > you /probably/ don't care, since it's been "good enough" for the GNU > tradition ( to be arbitrary and broken ) for years, but incompetence is > incompentence. > > If I rig my work to abuse all into obedience, everyone has the right to > call-me on it, and some program

Re: -fstype doesn't work

2005-11-04 Thread Bob Proulx
Han Boetes wrote: > And then ran the following command: > > find . -printf '%F %p\n' > > And the result was that all files were of the type unknown. What does 'df' say? df -TP . That command also lists out the type of the filesystem. What system are you running on? uname -a

[bug #14615] Coding rules

2005-10-04 Thread Bob Proulx
Follow-up Comment #4, bug #14615 (project findutils): > Maybe I should change my .emacs configuration to add "untabify" to write-file-hooks. I wouldn't. The find code right now matches the defacto standard of mod8 tabs. This is the same as other GNU projects and is the default for emacs, vi, v

[bug #14615] Coding rules

2005-09-22 Thread Bob Proulx
Follow-up Comment #2, bug #14615 (project findutils): > findutils is consistent in that \t is always treated as 8 columns > If your editor cannot properly be configured to treat tab characters as eight columns, then I would argue it is a bug in your editor Agreed. The standards only say that ho

Re: cygwin xargs limitation: ARG_MAX depends on command

2005-09-21 Thread Bob Proulx
Eric Blake wrote: > Chris Faylor (one of the cygwin maintainers) proposed a benchmark that > times the entire operation, not just the xargs invocation: > http://sources.redhat.com/ml/cygwin-patches/2005-q3/msg00107.html > > His numbers, with a modified xargs that ignored the _SC_ARG_MAX limit, > s

Re: cygwin xargs limitation: ARG_MAX depends on command

2005-09-05 Thread Bob Proulx
Eric Blake wrote: > But even if cygwin 1.5.19 were to define ARG_MAX and changes > sysconf(_SC_ARG_MAX) to 32k instead of 1 meg, this would unfairly > penalize cygexec mounts, which can handle much bigger command lines. I know this sounds like it would unfairly limit all uses because some uses are

Re: findutils-4.2.25: Compile problem under AIX 5.1 (gcc 4.0.0)

2005-09-05 Thread Bob Proulx
Jens Schleusener wrote: > Oh, just I found in /usr/include/fcntl.h the lines > > /* Redefine open and creat for large file enabled programming environment. > */ > #ifdef _LARGE_FILES > #define open open64 > #define creat creat64 > #endif > > just a line as you suspected in your previous

[bug #14243] Basic regular expressions does not work

2005-08-22 Thread Bob Proulx
Follow-up Comment #5, bug #14243 (project findutils): > So I guess \{ \} are part of basic regular expressions? No. In basic regular expressions those would be invalid character escapes. So that is not a valid POSIX basic regular expression. Because you would not find those in a valid POSIX B

[bug #14243] Basic regular expressions does not work

2005-08-21 Thread Bob Proulx
Follow-up Comment #3, bug #14243 (project findutils): Note that GNU grep uses an GNU regular expression engine which is compliant with POSIX but extents it. In particular \{ and \} are extensions. Normally those would not be valid escape sequences. Those invalid basic regular expression sequenc

Re: find "Value too large for defined data type"

2005-07-26 Thread Bob Proulx
Werner Brennecke - rockenstein AG wrote: > das Kommando find hat scheinbar ein Problem mit gemounteten NFS-Shares. > > Hier erscheint immer find "Value too large for defined data type" The 'find' command that you are using appears to be compiled without large file support. "large file support" m

Re: Longer worked examples in the findutils documentation - comments?

2005-07-23 Thread Bob Proulx
James Youngman wrote: > The Findutils documentation (in the development CVS tree) now includes > two longer worked examples which include several possible approaches > to solving some common problems with a discussion of why some ways of > solving the problem are better than others. I think having

Re: [bug #13774] Why is updatedb prefering /var/tmp over /tmp for temporary files?

2005-07-12 Thread Bob Proulx
> This was originally reported by Arthur Korn in http://bugs.debian.org/317815 > > updatedb by default uses /var/tmp for temporary files. > > | We had a problem today on one system where /var would be full every > | night. We figured out that /var/tmp/ was full with hundreds of megabytes > | of f

Re: [Patch] Locate: New option: --and

2005-06-11 Thread Bob Proulx
James Youngman wrote: > 2. call the option "--all" instead of "-and" to not have the short > form "-a". This allows us the option to later implement "-a" like > find. > > Any comments from other list members? I would prefer if all long options followed the double dash convention allowing shor

spam to bug-findutils -- mailing list changes

2005-05-07 Thread Bob Proulx
er address to myself so that I can give the list improved attention. Bob -- Bob Proulx <[EMAIL PROTECTED]> http://www.proulx.com/~bob/ ___ Bug-findutils mailing list Bug-findutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-findutils

Re: find 4.2.20 "-name" option

2005-05-05 Thread Bob Proulx
James Youngman wrote: > Findutils 4.2.1 made this change - see the NEWS file. I value compatibility between systems and so I think that is probably a good change. Bob ___ Bug-findutils mailing list Bug-findutils@gnu.org http://lists.gnu.org/mailman/l

Re: find 4.2.20 "-name" option

2005-05-03 Thread Bob Proulx
Darrell Tangman wrote: > I just installed findutils 4.2.20 and am finding that existing scripts > need tweaking. The latest problem (and the only thing that appears to be > an actual bug, and not just an incompatibility) is that the command > >find . -name '*' -print > > begins its output w

Re: Microsoft SFU

2005-04-24 Thread Bob Proulx
Substantially this same message was posted to bug-coreutils too. I followed up to the poster with a response to it there that is also appropriate here. Here is a pointer to it in the mail archive. http://lists.gnu.org/archive/html/bug-coreutils/2005-04/msg00167.html The archive does not show

Re: xargs feature request...

2005-04-21 Thread Bob Proulx
Linda A. W. wrote: > I think this has been the case a few times. As for worrying about > quotes within my filenames, yes, it could be a concern, but quotes in > file > names are less likely than spaces in my usage. But that is just trading one problem for the same problem with a dif

Re: xargs feature request...

2005-04-16 Thread Bob Proulx
Linda A. W. wrote: > It would be nice if xargs had an option to enclose the arguments it reads > in in either double or single quotes before passing them to a program. > > This would be especially useful for files with "spaces" in them. > :-) Trying to quote files with spaces is troublesome. Wha