bug-coreutils
[Top][All Lists]
Advanced

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

Re: Did I found a bug in "ls"?


From: Philip Rowlands
Subject: Re: Did I found a bug in "ls"?
Date: Tue, 10 Mar 2009 11:48:06 +0000 (GMT)
User-agent: Alpine 1.10 (DEB 962 2008-03-14)

On Sun, 8 Mar 2009, Major P?ter wrote:

The main problem with du is, that it doesn't care with users, so I need a "find" before (using the -user will solve the problem). But I can't use du `find ...` because it will contain the subfolders too, so it will duplicate, and the measure won't be correct. (Or if I'm use the --max-depth option it will still not care with the user filtering).
So by now I have this:
du `find . -type f -user foobar`
using sed, and a for cycle I can make a sum from this values.
But now, I don't have the sizes of the directories, so that's why I tried to use: ls `find . -type d -user foo -name "*"` # -name "*" will be removed in the final version
but didn't worked, so I wrote here a mail.
If you know a better way, please just send me a command or parameter name, because this is my homework. :)

I don't expect this list will do your homework for you, however... you can get all the required information about users and filesizes from find's -printf action.


Cheers,
Phil




reply via email to

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