Re: [dev] [sbase] Command list

From: Truls Becken <truls.becken_AT_gmail.com>
Date: Fri, 18 Oct 2013 15:45:11 +0200

On 2013-10-18, at 14:53, Strake wrote:

>> I'm not interested in disk usage, but finding files based on certain
>> properties, such as update time, ownership, permissions, etc.
>
> du -a | cut -f 2

Yes, but how do you filter the result on some combination of file attributes?

du -a | cut -f2 | xargs ls -dl | grep <awful pattern> | sed 's/.*:[0-9]* //' ?

And then you would have a hard time specifying pattern for "newer than 5 days".

If you want to do it this way around, a command is missing for filtering a
list of file names, as already mentioned by Raphaël. It could be generalised
to a command for filtering stdin by calling a predicate command, e.g:

du -a | cut -f2 | filter test -w

For this, test is missing "newer than 5 days" since that's what find does.

-Truls
Received on Fri Oct 18 2013 - 15:45:11 CEST

This archive was generated by hypermail 2.3.0 : Fri Oct 18 2013 - 15:48:07 CEST