[bug #56855] find -printf %h gives an empty string for the root directory '/'

2023-04-27 Thread Eric Blake
Follow-up Comment #3, bug #56855 (project findutils): POSIX is clear in https://pubs.opengroup.org/onlinepubs/9699919799/functions/dirname.html that the dirname(3) function returns a non-empty string for input of "/". However, POSIX is also clear that the string composed by 'dirname(str)+"/"+base

Re: [PATCH 3/3] maint: avoid warnings from sparse tool

2022-01-12 Thread Eric Blake
On Thu, Jan 06, 2022 at 04:47:40PM +0100, Bernhard Voelker wrote: > https://sparse.docs.kernel.org/ > Running the tool against unviled the following warnings: unveiled -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org

POSIX conformance question on -perm

2021-02-01 Thread Eric Blake
et if the file creation mask does not have S_IWGRP set (otherwise S_IWGRP is ignored), and S_IWOTH set if the file creation mask does not have S_IWOTH set (otherwise S_IWOTH is ignored). -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org

Re: Is there a way to let find return non-zero when nothing is found?

2019-11-11 Thread Eric Blake
something into find to do what you're asking, but I don't know that I would be the one to write such a patch. We'd also have to be very clear about what the semantics are (is it a command line option, or would it be a predicate that you can place alongside other predicates wher

Re: xargs prompts with the same string, but executes differently

2019-07-29 Thread Eric Blake
is unspecified, > assume {} > ... > > Don't you want to mention one is deprecated? Or even remove the > deprecated one from --help entirely? Just because POSIX deprecated -i doesn't mean we have to. We fully support both -i and -I, with no plans to deprecat

Re: xargs prompts with the same string, but executes differently

2019-07-24 Thread Eric Blake
ke. Just in case, we could still guard quotearg_n_style > by "if (ask)". POSIX merely says that -p implies -t, so I argue that consistency between the two is better than only doing it for -p. I also agree that POSIX doesn't seem to have any hard rules about what the format

Re: xargs prompts with the same string, but executes differently

2019-07-24 Thread Eric Blake
f producing various representations of the output to avoid ambiguities). If we do use gnulib's quotearg module, we also benefit from QUOTING_STYLE in the environment regardless of whether we add a command-line option. -- Eric Blake, Principal Software Engineer Red Hat, Inc.

Re: xargs prompts with the same string, but executes differently

2019-07-23 Thread Eric Blake
click 1 mousemove restore > vs >   echo | xargs -p xdotool mousemove "0 0" click 1 mousemove restore Still, it would be nice if xargs could add appropriate quoting in its -p output to avoid the ambiguity. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-91

Re: find usage question

2019-03-19 Thread Eric Blake
an do is: find ... -printf 'cp %p /d/data/%p_%s\n' | xargs -L1 where you instruct the -printf form to output the entire command you want executed (rather than trying to piece together the command with -exec), and instead have xargs execute it. -- Eric Blake, Principal Software E

Re: Problem with "." and ","

2019-03-15 Thread Eric Blake
ways parses "." as a decimal separator regardless of what other characters it might ALSO parse depending on locale. Beyond that, it is your responsibility to be aware of what locale your script is using. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org signature.asc Description: OpenPGP digital signature

Re:

2019-03-15 Thread Eric Blake
27; executes in depth-first traversal (subdirectories are visited before files in the parent directory). -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org signature.asc Description: OpenPGP digital signature

Re: [PATCH] find -samedev NAME: true for files on the same device as NAME

2018-11-01 Thread Eric Blake
different, where -xdev stays unchanged from current behavior and -mount excludes the mount point itself. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org

Re: [bug #33724] Find command is changing the access time of directory

2018-10-01 Thread Eric Blake
hat the user wants, even if we implement the fallback to retrying the open without O_NOATIME on EPERM) is okay by me. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org

[bug #42318] find with xdev traverses other filesystem when mountpiont is subdirectory

2018-09-28 Thread Eric Blake
Follow-up Comment #12, bug #42318 (project findutils): The initial POSIX interpretation has come out, and recommends standardizing -mount to behave like nftw(FTW_MOUNT) (which does NOT include the mount point - Solaris style), and adding nftw(FTW_XDEV) to match the existing behavior of -xdev (whic

[bug #54745] -mount needs to be slightly different from -xdev

2018-09-27 Thread Eric Blake
URL: Summary: -mount needs to be slightly different from -xdev Project: findutils Submitted by: ericb Submitted on: Thu 27 Sep 2018 09:31:35 AM MDT Category: None Seve

Re: Introduce posix_spawn

2018-09-10 Thread Eric Blake
On 09/08/2018 02:24 AM, Bernhard Voelker wrote: On 09/08/18 00:15, Eric Blake wrote: Adding posix_spawn_file_actions_addchdir() is what avoids the need to lock in the parent, because now you do: A thought WRT the naming: while ..._addopen() can be called for more file descriptors, there&#

Re: posix_spawn_file_actions_addchdir

2018-09-07 Thread Eric Blake
bugs.net/view.php?id=1208 There, I argue that we also need posix_spawn_file_actions_addfchdir(), in part because it lets us get the same power as openat() in determining how relative file names are resolved in relation to an fd. -- Eric Blake, Principal Software Engineer Red Hat, Inc.

Re: Introduce posix_spawn

2018-09-07 Thread Eric Blake
On 09/07/2018 05:06 PM, Bruno Haible wrote: Eric Blake wrote: Although it gets prohibitively expensive in a multi-threaded process to ensure proper locking between all threads that might want to use posix_spawn Why locking? posix_spawn uses fork() - the vfork() optimization is not possible in

Re: Introduce posix_spawn

2018-09-07 Thread Eric Blake
that, and a couple of other minor things I've spotted during my re-read of what I posted. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org

Re: Introduce posix_spawn

2018-09-07 Thread Eric Blake
On 09/07/2018 09:44 AM, Eric Blake wrote: Adding gnulib: On 09/06/2018 11:37 PM, Barath Aron wrote: On 9/7/18 4:54 AM, Dale R. Worley wrote: Couldn't you change the w.d. to the correct target, spawn, and then change the w.d. back? Yes, one could do this. Although it gets prohibit

Re: Introduce posix_spawn

2018-09-07 Thread Eric Blake
f shortcomings in various platforms' posix_spawn) Aron [1] https://docs.oracle.com/cd/E86824_01/html/E54766/posix-spawn-file-actions-addchdir-np-3c.html -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org

Re: [PATCH] Significant performance improvements to locate, struct order optimizations

2018-05-16 Thread Eric Blake
to make the reviewer's life easier, even if a series of well-divided patches adds up to more cumulative changes (due to churn on some lines) than a single patch that combines all the changes at once. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org

Re: strange behaviour of find -iname

2018-03-27 Thread Eric Blake
you can use echo to see for sure). What you WANTED to type was: find -name '*astrill*' which forces the shell to treat the argument as a literal rather than a glob, so that find can then match the glob. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919

[bug #52890] `find --name` ignores files with non-printable character in the filename

2018-01-15 Thread Eric Blake
Follow-up Comment #3, bug #52890 (project findutils): You've discovered a fundamental flaw in the specification of the glob() function - it is only required to have well-defined behavior on byte strings that are valid encodings in the current locale. There is no portable way to make glob patterns

Re: Bizzare bug in find, potential security implications

2017-12-19 Thread Eric Blake
filenames), then POSIX says regex behavior is undefined. So while it is indeed annoying that find can't match files with encoding errors, it is somewhat expected behavior, because there's no sane way to make regex well-specified on encoding errors. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org

Re: selinux

2017-11-27 Thread Eric Blake
much troubleshooting of the failure. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org

Re: Need to know technical support for GnuWin32: FindUtils 4.2.20-2 versions

2017-08-30 Thread Eric Blake
/www.cygwin.com), which at least has more up-to-date ports than GnuWin32. But again, support questions about using Cygwin would be properly directed to the Cygwin list, not here. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org signature.asc Description: OpenPGP digital signature

Re: Several changes made to fts.c in Gnulib

2017-07-27 Thread Eric Blake
ulib) whether we have to regenerate the diff, at which point we can cater to a new option by bumping our value for FTS_NOLEAF. Here's an example of coreutils storing its project-local diffs to upstream gnulib: http://git.sv.gnu.org/cgit/coreutils.git/tree/gl/lib/tempname.c.diff -- Eric Bla

Re: findutils 4.6.0 v. Tru64 (strftime() v. "%F"?)

2017-07-25 Thread Eric Blake
On 07/23/2017 04:22 PM, James Youngman wrote: > Please try the attached patch, which should fix the problem with %F on > Tru64 and on HP-UX. Why not use gnulib's nstrftime module instead, then you can rely not only on %F, but also on extensions like %s, regardless of libc? --

[bug #51506] Better support for data processing with basenames

2017-07-24 Thread Eric Blake
Follow-up Comment #15, bug #51506 (project findutils): Submit patches, and we'll review them. Until then, you are wasting more developer time arguing for the theoretical, than you are saving by optimizing any programs. I agree with James - there's no need to add yet more knobs to findutils' conf

[bug #51506] Better support for data processing with basenames

2017-07-19 Thread Eric Blake
Follow-up Comment #1, bug #51506 (project findutils): What resources are you envisioning that '-printf %f\\n' uses that would not be used by adding a new option, when balanced against the pain of adding, documenting, and maintaining a new option, for something that is already such a corner case th

Re: findutils 4.6.0 v. Tru64 (strftime() v. "%F"?)

2017-05-26 Thread Eric Blake
b/libfind.a ../gl/lib/libgnulib.a -lintl -lm -lm -lpthread > Weird. I don't know if fixing findutils to use gnulib's nstrftime() will still need to pull in -lpthread on that platform; if so, that will be a gnulib patch to write. I guess we'll find out, once someone contributes the

Re: findutils 4.6.0 v. Tru64 (strftime() v. "%F"?)

2017-05-25 Thread Eric Blake
but it's at least pointing out that gnulib should be documenting the known pitfalls in native strftime() implementations. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org signature.asc Description: OpenPGP digital signature

[bug #51069] find changes access time on directories

2017-05-22 Thread Eric Blake
Follow-up Comment #2, bug #51069 (project findutils): Linux has an extension open(O_NOATIME) that allows one to pick-and-choose when to NOT adjust the atime of a directory, without being as heavy-handed as a mount option for all operations on the entire tree. As an extension to POSIX, we could of

[bug #50835] -print0 causes all files to be output

2017-04-20 Thread Eric Blake
Update of bug #50835 (project findutils): Item Group:Wrong result => None Status:None => Duplicate Open/Closed:Open => Closed

[bug #50780] -type option after printf is ignored

2017-04-10 Thread Eric Blake
Update of bug #50780 (project findutils): Status:None => Invalid Open/Closed:Open => Closed ___ Follow-up Comment #1: And that behavior

[bug #50606] Garbage printed with "no such file or directory"

2017-03-21 Thread Eric Blake
Follow-up Comment #1, bug #50606 (project findutils): Most likely, that is not garbage, but a mismatch in your terminal and your locale. find is trying to use UTF-8 quote characters around the file name that is missing, but your terminal doesn't understand how to display those characters. If 'LC

Re: RFE: allowing "" as a path specification for 'current dir' w/o prepending './' ?

2017-03-02 Thread Eric Blake
nd '' magically starting to produce successful output where POSIX requires it to fail. > But I've not said that you shouldn't remove the "./" or that you can't > have the feature. You certainly can, you can change the code of GNU find > any way you like.

Re: RFE: allowing "" as a path specification for 'current dir' w/o prepending './' ?

2017-03-02 Thread Eric Blake
s that not apply to scripts, but, by definition, precludes use > of command-line options. Ah, but that's where you're missing the point. Changing interactive behavior does NOT require that you are forced to always type the new command-line option, because you are free to set up a w

Re: RFE: allowing "" as a path specification for 'current dir' w/o prepending './' ?

2017-03-02 Thread Eric Blake
EPENDS_NODOT" (or whatever!). Please, do NOT make the behavior depend on an environment variable. That is a sure way to break scripts that are not expecting the environment to cause a change in behavior. If you want a different behavior, the right way to do it is via a new command-line op

[bug #50259] -printf %h behaves weirdly with trailing slashes

2017-02-20 Thread Eric Blake
Follow-up Comment #11, bug #50259 (project findutils): You need to make sure 'find // -printf %h' does not corrupt leading // (which POSIX allows to be distinct from /). ___ Reply to this item at: _

Re: Potential linux find utility bug / misdocumentation

2017-02-06 Thread Eric Blake
important to always quote the arguments so that the shell doesn't prematurely expand things. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Explaining +/-n

2016-11-22 Thread Eric Blake
test > commit.) > > Could someone fill me in on what is going on here? I'm reluctant to > believe that find.1 and find.texi are maintained separately, but that's > what it looks like. Yes, findutils is one of the few pages that actually maintains a separate man page at

Re: [Findutils-patches] [PATCH] find: handle more readdir(3) errors

2016-11-01 Thread Eric Blake
ide the for loop; the second does readdir() inside a while(1) loop. Okay, I stand corrected, the second file is indeed fine (because it DOES reset errno each time); but you are right that adding a comment to the first file will help. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtu

Re: [Findutils-patches] [PATCH] find: handle more readdir(3) errors

2016-11-01 Thread Eric Blake
me[1] != 0 && dent->d_name[1] != '.')) > + || (dent->d_name[1] != 0 > + && (dent->d_name[1] != '.' || dent->d_name[2] != 0))) > { > const int fd = safe_atoi (dent->d_name, literal_quoting_style); THIS loop is a demonstration of how not to use readdir; safe_atoi() can clobber errno, so you are no longer guaranteed that each loop iteration is starting with errno == 0. You'll have to tweak the patch. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

[bug #48314] find -type f matches symlinks in armel armhf and mipsel

2016-07-16 Thread Eric Blake
Follow-up Comment #5, bug #48314 (project findutils): The C standard does not guarantee NULL pointers from xzalloc(), but POSIX does: http://austingroupbugs.net/view.php?id=940 and GNU has relied on that for years, with no real complaints of a compiler/platform mis-handling NULL. ___

Re: putc(-1) == EOF on IRIX in frcode

2016-06-14 Thread Eric Blake
tdout)) This workaround should be embedded in gnulib, so that findutils can continue to use putc() without the cast. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [6 PATCHES] New feature added to find: -type xyz

2016-03-02 Thread Eric Blake
On 03/02/2016 01:44 PM, Dale R. Worley wrote: > Eric Blake writes: >>> The instructions to build is in the README-hacking file. Perhaps we >>> should add INSTALL file. >> >> INSTALL is generated as part of bootstrapping the package. >> README-hacking tells

Re: __attribute__ and timeval problems building findutils on IRIX

2016-03-01 Thread Eric Blake
@ -17,6 +17,7 @@ > > #include > > +#include > #include Rather, we should be fixing gnulib's replacement header to be self-contained. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [6 PATCHES] New feature added to find: -type xyz

2016-03-01 Thread Eric Blake
The instructions to build is in the README-hacking file. Perhaps we should > add INSTALL file. INSTALL is generated as part of bootstrapping the package. README-hacking tells how to bootstrap the package. Building from git is different than building from a tarball (which has already been bo

[bug #47261] find produces two different results for the same command

2016-02-26 Thread Eric Blake
Follow-up Comment #5, bug #47261 (project findutils): Could it be a case of automounting kicking in? If your file is hidden behind a mount point, maybe the first run triggers the mount to automount but doesn't descend, and the second one is able to descend into the (now-mounted) location? __

Re: find -f -, please?

2016-02-16 Thread Eric Blake
de the actual code), but it does sound interesting. If you are interested in pursuing copyright assignment to the FSF, then we'd love to have you submit a patch. At any rate, even if you don't supply a patch, you have proposed not one, but two potentially useful enhancements. It may be worth recording them in the Savannah bug tracker so we don't forget about this mail. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Hello, maybe not the right mail address...

2016-01-21 Thread Eric Blake
/archive/html/bug-findutils/2016-01/msg00074.html -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Comunicar errores a .Desinstalando libpython3.4-stdlib:amd64 (3.4.4-1) ...

2016-01-19 Thread Eric Blake
27;apt' than in xargs (that is, some bug in the apt script is invoking xargs with incorrect arguments), in which case you aren't even asking on the best list. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [PATCH] updatedb: run in the C locale, don't do case-folding.

2016-01-13 Thread Eric Blake
o, we can't globally set LC_ALL=C, but instead have to do it piecemeal at a time on any operations we are doing that should not leak to the user, while honoring the user's locale for operations that produce text back to the user. Which is obviously trickier to do. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [PATCH] updatedb: Remove support for the old pre-4.0 database format.

2016-01-13 Thread Eric Blake
you mention a tentative timeline for this removal, or even hedge it with "in a few more releases"? -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: feature proposal/request: find -crtime

2015-12-03 Thread Eric Blake
o a Linux-specific hack to get at birthtime feels a bit counter-productive, when it would be better to fix the kernel or at least gnulib to provide the information easily for everyone to benefit. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.

Re: find / -iregex not working as expected

2015-11-12 Thread Eric Blake
ing the argument to find. Generally not what you want. > find / -iregex '*postgresql.*.conf' This is no different than your first attempt (changing between '' and "" shell quoting doesn't affect the string seen by find). What you probably want is to use

Re: a minor bug

2015-11-10 Thread Eric Blake
; - input_stream = fopen (input_file, "r"); > + input_stream = fopen (input_file, "re"); fopen(,"re") is not (yet) POSIX; we'd have to guarantee that it is first supported by gnulib before we could rely on it. But the idea of marking fds close-on-exec in xargs so

Re: [bug #45445] AIX make check test-getdelim.c:72: assertion failed Abort(coredump)

2015-08-31 Thread Eric Blake
matches the POSIX and GNU version, or whether it is an unrelated symbol (as appears to be the case on AIX), so that configure can get the right result from the beginning instead of you having to override a cache value. > Reply to this item at: > > <http://savannah.gnu.org/bugs/?454

Re: find --help :: typo

2015-07-15 Thread Eric Blake
ls invocation' $ LC_ALL=de_DE.UTF-8 find --help | tail -n3 Fehler (und Informationen über deren Abarbeitungsstand) können auf der Fehlerberichtseite der findutils auf http://savannah.gnu.org/ eingegeben oder per E-Mail an gesendet werden. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Filename Expansion: Find Utility Pattern Matching vs Bash Shell Pattern Matching

2015-06-16 Thread Eric Blake
is a bash extension) and dotglob (where matching a leading dot behaves differently as required by POSIX). >3. Does bash also use the fnmatch library or some other mechanism for >filename expansion and pattern matching? That may be a question better asked on the bash list, or by looking in the bash source code. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Why xargs still call the command when there is no input?

2015-06-02 Thread Eric Blake
precisely because sometimes the zero-or-more behavior makes more sense. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: How to search for symlinks pointing to directories?

2015-04-18 Thread Eric Blake
On 04/18/2015 11:41 AM, Peng Yu wrote: > This can be used to check if a symbolic link is pointing a file, a > directory, etc. Is there a way to check if a symbolic link is broken > without enumerating all the possibilities? find -L -type l -- Eric Blake eblake redhat com+1-919

Re: How to search for symlinks pointing to directories?

2015-04-18 Thread Eric Blake
nd? Thanks. find -xtype d \! -type d does what you want. It finds all files that are directories after symlink resolution, but which are not directories to begin with. In an empty directory: $ touch a $ mkdir b $ ln -s a c $ ln -s b d $ find -xtype d \! -type d ./d -- Eric Blake eblak

Re: Allow `find` to use exported function for -exec*?

2015-04-15 Thread Eric Blake
n exports is a property of the shell, not of find. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

[bug #44570] Wrong find -type f -not -name "*txt" result for files with weird names

2015-03-18 Thread Eric Blake
Follow-up Comment #1, bug #44570 (project findutils): Try again, using: LC_ALL=C find -type f -not -name '*.txt' My guess is that you are in a non-C multibyte locale, and that the filenames being printed are ones that are invalid when interpreted in the multibyte encoding rules of your current lo

[bug #44569] find newermt cannot figure out how to interpret some dates.

2015-03-18 Thread Eric Blake
Update of bug #44569 (project findutils): Status:None => Invalid Open/Closed:Open => Closed ___ Follow-up Comment #1: This is not a bug

Re: bug in find?

2014-10-24 Thread Eric Blake
? :) You've made a classing quoting blunder, and didn't find any problem in find itself. By the way, your mail came through rather botched. It is very hard to see what you typed vs. what your terminal was displaying, when you had line wraps that munged lines together. -- Eric Blake

Re: /opt/bin/find error

2014-10-13 Thread Eric Blake
On 10/13/2014 02:08 AM, Steve Forman wrote: > I'm getting this error and can find absolutely no information on it. > find: ‘.’: Unknown error -89 > > No matter what path I use I always get this message. > Any ideas? What does '/opt/bin/find --version' say? --

Re: find 4.2.20-2 bug

2014-05-30 Thread Eric Blake
don't maintain the windows port here. > > it is broken, please fix. thanks. also, it is very very slow on windows > (cygwin). Cygwin is a different port than gnuwin32; but the same caveat applies - you are better off reporting your bug to the downstream port than here. -- Eric B

Re: xargs - how to get it to execute input args as "the command"?

2014-01-05 Thread Eric Blake
On 01/05/2014 04:09 AM, Linda A. Walsh wrote: > (tried "exec", but I guess that is a shell builtin...sigh)... How about 'env' instead of 'exec'? -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature

[bug #35753] Completion of error handling

2013-12-10 Thread Eric Blake
Follow-up Comment #3, bug #35753 (project findutils): Patch 4 is pointless. We use atexit(close_stdin) for a reason: all reads from stdin and all writes to stdout/stderr will cause the ferror() flag for the standard descriptor to be set if there is a failure, and close_stdin will then guarantee n

Re: Regression: "find dir/. -type d -empty -delete" claims 'unsuccessful', breaking scripts.

2013-11-18 Thread Eric Blake
r own software that behaves the way you want. But I don't see anything in your report that points out anything wrong with either GNU coreutils or GNU findutils with regards to attempting to delete a directory with a trailing "." as the final component, and then correctly reporting th

Re: Regression: "find dir/. -type d -empty -delete" claims 'unsuccessful', breaking scripts.

2013-11-18 Thread Eric Blake
s remove(), and since remove("dir/.") is required to fail, it is the only logical behavior, even if the extension itself is not required by POSIX. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Regression: "find dir/. -type d -empty -delete" claims 'unsuccessful', breaking scripts.

2013-11-18 Thread Eric Blake
ot; works, but > exits with a failure code causing scripts to break. This behavior is required by POSIX. Sorry. > POSIX is dead Ranting against POSIX won't buy you any friends. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: xargs bugs

2013-11-01 Thread Eric Blake
/mode/dai/g'` to see that you were executing: xargs -t -i mv {} {} which is NOT what you wanted. You need to use proper quoting; and since you want to do programmatic shell actions on {}, you need your xargs to spawn an instance of sh. Try: xargs -t -i sh -c 'mv "$1" "$(e

[bug #40339] mountlist.c:936]: (error) Resource leak: dirp

2013-10-21 Thread Eric Blake
Follow-up Comment #1, bug #40339 (project findutils): Already fixed in upstream gnulib commit 98171ec2; just a matter of pulling the latest gnulib into the next findutils build. ___ Reply to this item at:

Re: [bug #34976] find: Failed to save working directory in order to [...]: Too many open files

2013-09-20 Thread Eric Blake
- predicates, we do so now. > + the wd_for_exec member of sturct exec_val. So for those > + predicates, we do so now. s/sturct/struct/ as well as some non-portable shell: > + for i in $(seq 0 100) ; do seq is not POSIX; and I don't know that you can assume that GNU coreutils a

Re: xargs -p operations out of order!

2013-07-31 Thread Eric Blake
On 07/31/2013 04:00 PM, Bernhard Voelker wrote: > Hi Eric, > > On 07/31/2013 07:10 PM, Eric Blake wrote: >> On 07/31/2013 11:01 AM, jida...@jidanni.org wrote: >>> $ seq 111|xargs -n 5 -p > >> Sorry, but this is not xargs' fault. You asked xargs to s

Re: xargs -p operations out of order!

2013-07-31 Thread Eric Blake
e terminal, there is no sane way to guarantee which of the processes will get there first. This is not an xargs bug. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

[bug #38474] Unintended (?) behaviour change of -perm +mode predicate

2013-04-22 Thread Eric Blake
Follow-up Comment #9, bug #38474 (project findutils): Paul's patch, as modified in commit 9040c5d, is not quite right. The bool havekind variable is now useless; it is set to true by all branches of the switch statement. It can safely be deleted, along with a later switch statement when havekind

[bug #38474] Unintended (?) behaviour change of -perm +mode predicate

2013-04-20 Thread Eric Blake
Follow-up Comment #6, bug #38474 (project findutils): > POSIX only calls out symbolic mode, not numeric mode Well, POSIX also calls out numeric mode: -perm [−]onum If the is omitted, the primary shall evaluate as true when the file mode bits exactly match the value of the octal number onum (se

[bug #38474] Unintended (?) behaviour change of -perm +mode predicate

2013-04-20 Thread Eric Blake
Follow-up Comment #5, bug #38474 (project findutils): By my reading, '-perm +0100' is indeed unspecified by POSIX (POSIX only calls out symbolic mode, not numeric mode), so we get to choose how to handle it (the confusion with leading + is applicable to only things like '-perm +u+x'). I see two p

[bug #38696] -exec didn't print error message if no '; ' delimiter found and redirection used

2013-04-10 Thread Eric Blake
Update of bug #38696 (project findutils): Status:None => Invalid Open/Closed:Open => Closed ___ Reply to this item at:

Re: please cut up help text of xargs into manageable translatable chunks

2013-02-08 Thread Eric Blake
lines=MAX-LINESuse at most MAX-LINES nonblank > input lines per\n" > + " command line\n")); > + HTL (_(" -l [MAX-LINES] similar to -L but defaults to at > most one\n" > + "

Re: please cut up help text of xargs into manageable translatable chunks

2013-02-08 Thread Eric Blake
HTL (" -X, --xyz some text\n\"); >> HTL (" -Yanother option with a longer\n\ >> description message\n\"); No, just use C string concatenation to get alignment: HTL (" -X, --xyz some text\n"); HTL (" -Y

Re: Hi small improvement to find command.

2013-01-29 Thread Eric Blake
dd suffix parsing to -mtime without violating POSIX, so it might make a nice syntactic sugar addition. If you are willing to write the patch, including documentation and testsuite additions, your proposal will get a lot further. But for now, it appears that no one else is interested in imple

Re: Bug or changed behaviour in GNU find?

2012-11-27 Thread Eric Blake
> $ find . -name "*.h" -o -name "*.cc" -o -name "*.tcc" This is equivalent to: find . \( -name "*.h" -o -name "*.cc" -o -name "*.tcc" \) -print > ./foo.h > ./foo.cc > ./foo.tcc > > $ find . -name "*.h" -o -name "*.cc" -o -name "*.tcc" -print0 | tr > '\0' '\n' This is equivalent to: find . -n

Re: [PATCH] fts: reduce two or more trailing spaces to just one, usually

2012-11-01 Thread Eric Blake
stsuite/find.gnu/name-slash.exp, I'm not sure > whether find or its test suite has to be updated. > > -- Eric Blake ebl...@redhat.com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

[bug #37423] Duplicate definition of program_name in test-canonicalize

2012-09-24 Thread Eric Blake
Follow-up Comment #1, bug #37423 (project findutils): Thanks for the report. This is an upstream bug in gnulib, and will be resolved by having findutils update to a newer version of gnulib. ___ Reply to this item at:

[bug #37201] Colourized output

2012-08-27 Thread Eric Blake
Follow-up Comment #1, bug #37201 (project findutils): And what exactly do you propose coloring? Are you suggesting that 'find -printf' should honor LS_COLORS to colorize file names according to file type, in the same manner as ls? Patches are certainly welcome, although it would be best by start

Re: find: sort files by date modified

2012-07-20 Thread Eric Blake
On 07/20/2012 11:18 AM, Enda wrote: > find -mtime 0 -printf "%f\n" > > > I use find to list files that were modified in the last 24 hours, how > do I sort them in order of when they were modified? find -mtime 0 -exec ls -d --sort=time {} + -- Eric Blake ebl...@redh

[bug #36539] -size flag seems to be broken

2012-05-25 Thread Eric Blake
Update of bug #36539 (project findutils): Status:None => Duplicate Open/Closed:Open => Closed ___ Follow-up Comment #1: This is a duplica

[bug #36452] xargs needs "-I" (eye) last ...

2012-05-11 Thread Eric Blake
Follow-up Comment #1, bug #36452 (project findutils): POSIX states that mixing -I and -L is not portable: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/xargs.html You are using a non-portable command line, and so it should come as no surprise that BSD and GNU xargs differ in behavior

[bug #26885] -size checks filesize, not blocks-used-in-filesystem.

2012-01-12 Thread Eric Blake
Follow-up Comment #4, bug #26885 (project findutils): Alas, no - this web page is not the right place for copyright disclaimers. But I will send you directions via email to the correct web page (assuming you reside in the US) or directions for starting a snail mail exchange (if you reside elsewhe

Re: how to do findutils cross-compilation for ARM platform?

2011-12-28 Thread Eric Blake
r post more of config.log so that we know the full set of cross-compilation guesses in effect). -- Eric Blake ebl...@redhat.com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

[bug #35141] [feature_request] -prune0 action, or a -0 option

2011-12-21 Thread Eric Blake
Update of bug #35141 (project findutils): Status:None => Invalid Open/Closed:Open => Closed ___ Follow-up Comment #1: Such an option al

Re: Dowload area shows still 4.4.2

2011-12-09 Thread Eric Blake
o packager (aka me for cygwin) is not willing to cherry-pick back into stable. -- Eric Blake ebl...@redhat.com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: How to find by birth time?

2011-11-21 Thread Eric Blake
gwin support birthtime as part of stat(), but Linux does not (so it will NOT work on Linux until the kernel developers ever give us the xstat() interface). -- Eric Blake ebl...@redhat.com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

  1   2   3   4   >