coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] filter ls output by filetype


From: Hal Ashburner
Subject: Re: [PATCH] filter ls output by filetype
Date: Fri, 29 Nov 2013 10:41:38 +1100




On 29 November 2013 02:12, Hal Ashburner <address@hidden> wrote:



On 29 November 2013 01:31, Erik Auerswald <address@hidden> wrote:

 
How about --list-type? I'd say the name should contain 'type' and
something to differentiate it from '--file-type'.

Sounds pretty reasonable.

how about following this approach

 --list-permission for the same kind of more generalized filtering to match on permissions
Taking an argument that is the same as that used by chmod. To match all items where executable by other can use either o+x or 001 and so on. u+s g-s and +t could work there too.


Then the issue of is it symbolic link itself that is wanted (or excluded) or should that decision be made on the basis of what it points to?
One idea is:

Just add the -L, --dereference flag.
another is
--list-linked-type which would do the same as --list-type but work on the dereferenced links.

What do you think?


 
 
 
Anyway, ls --file-type | grep _might_ work most of the time, but would
become difficult with e.g. spaces or newlines in a file name, thus I'd
say this functionality looks useful.

Thanks.
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]