readlink(1) of more than one file?

2012-12-12 Thread Aaron Davies
Is there a reason the interface for readlink(1) is “FILE” instead of “FILE...”? I’ve often wanted to do e.g. “find -type l|xargs readlink” or (in zsh) “readlink **/*(@)”, and having to do a shell loop or use “xargs -n1” seems inelegant. -- Aaron Davies aaron.dav...@gmail.com

standard for stdin / args handling?

2012-12-26 Thread Aaron Davies
afaict from my general *nx experience, the basic rule for text-handling utilities (filters, etc.) is as follows: first, no argument(s) means stdin is used; second, argument(s) means stdin is ignored, unless "-" is present as an argument, in which case stdin is used in the position in the sequenc

du -s excluding size from directory entries?

2013-04-13 Thread Aaron Davies
ewhat different. i can get this result with something like `find -not -type d -print0|xargs -r0 stat -c %s|paste -sd+|bc', but a simpler solution would be nice. -- Aaron Davies adavie...@me.com

Formatting Columnar/Delimited Data?

2013-09-16 Thread Aaron Davies
Are there any tools for formatting character-delimited, columnar files (csv, tab-separated, etc.) for easy viewing? I'm looking for something that will work out the proper width for each column and use that to output the file in space-padded, fixed-width format.

Re: Formatting Columnar/Delimited Data?

2013-09-18 Thread Aaron Davies
On Sep 16, 2013, at 10:48 AM, Sami Kerola wrote: > On 16 September 2013 15:43, Aaron Davies wrote: > >> Are there any tools for formatting character-delimited, columnar files (csv, >> tab-separated, etc.) for easy viewing? I'm looking for something that will >>

README-prereq issues

2013-10-14 Thread Aaron Davies
in the autoconf section, the line "cd autoconf" between "git clone" and "git checkout" is missing more importantly, "git checkout v2.62" doesn't work--it reports "error: pathspec 'v2.62' did not match any file(s) known to git." -- Aaron Davies aaron.dav...@gmail.com

Re: du -s excluding size from directory entries?

2014-01-24 Thread Aaron Davies
would people be interested in a patch implementing this? it's about a dozen lines to add (~60 line patch). On Sat, Apr 13, 2013 at 2:15 AM, Pádraig Brady wrote: > On 04/13/2013 08:22 AM, Aaron Davies wrote: >> is there an easy way to `du -s' a tree and ignore the size of

Re: du -s excluding size from directory entries?

2014-01-24 Thread Aaron Davies
> On Jan 24, 2014, at 3:40 PM, Pádraig Brady wrote: > >> On 01/24/2014 08:41 PM, Aaron Davies wrote: >> would people be interested in a patch implementing this? it's about a >> dozen lines to add (~60 line patch). >> >>> On Sat, Apr 13, 2013 at 2:15

Re: du always stats all mount points now?

2015-09-19 Thread Aaron Davies
> On Sep 19, 2015, at 3:20 AM, Bernhard Voelker > wrote: > >> On 09/19/2015 08:33 AM, adavies42 wrote: >> Thanks for the quick fix. You can credit me as "Aaron Davies". > > I noticed that there's already a such an entry, yet with a different >

Re: RFE: head,tail: -z, --zero-terminated

2015-10-19 Thread Aaron Davies
rtcut for the options that make bash's `read' handle null-terminated text: # ideal hypothetical code unset files typeset -a files dirs=(a b c) while read -z line do files["${#files[@]}"]=$line done < <(for dir in "${dirs[@]}"; do find "$dir" -type f -printf '%T@\t%p\0' | sort -zk1,1n | tail -zn1 | cut -z -d $'\t' -f 2; done) foo "${files[@]}" -- Aaron Davies aaron.dav...@gmail.com

human-readable / block-size as a general utility?

2011-08-18 Thread Aaron Davies
is there a way to access the -h functionality of du/df/ls as a general utility? i'd like to write a wrapper for a badly-behaved quota tool that only uses 1K blocks -- Aaron Davies aaron.dav...@gmail.com

Re: human-readable / block-size as a general utility?

2011-08-18 Thread Aaron Davies
On Aug 18, 2011, at 10:00 AM, Pádraig Brady wrote: > On 08/18/2011 04:41 AM, Aaron Davies wrote: >> is there a way to access the -h functionality of du/df/ls as a general >> utility? >> >> i'd like to write a wrapper for a badly-behaved quota tool that only >

slow ls -l due to lgetxattr

2012-05-11 Thread Aaron Davies
calls return -1 and report EOPNOTSUPP (as do all the calls to getxattr, but they only seem to take ~43µs each, slightly less than the lstat's which are doing the actual work (~39µs), so that isn't such a big deal.) is this expected behavior? -- Aaron Davies aaron.dav...@gmail.com

Re: Feature Request: chmod u+s/g+s/+t for dirs only

2025-02-03 Thread Aaron Davies
`. On Mon, Feb 3, 2025 at 1:07 PM Aaron Davies wrote: > > In the contexts of recursive chmod, it would be useful to be able to > apply u+s, g+s, and +t only to directories. In the spirit of the > existing +X option, I suggest u+S/g+S/+T as the syntax for this > behavior. &

Feature Request: chmod u+s/g+s/+t for dirs only

2025-02-03 Thread Aaron Davies
In the contexts of recursive chmod, it would be useful to be able to apply u+s, g+s, and +t only to directories. In the spirit of the existing +X option, I suggest u+S/g+S/+T as the syntax for this behavior. -- Aaron Davies aaron.dav...@gmail.com