how to combine 'du' and 'ls'

whenever whatever at whoever.net
Mon Dec 18 12:46:57 PST 2000


ls | xargs -n 1 du -hs

On Sun, Dec 17, 2000 at 03:25:19PM -1000, Griffith Feeney wrote:
> How to combine 'ls' and 'du' to get a listing of the space taken by each
> directory in /?
> 
> 'du -hs bin boot usr' will show size of bin, boot and usr, but you have to
> type each directory name.
> 
> 'du -hs bin boot usr < ls' doesn't work, nor does 'ls | du -hs -'. Can one
> use ` somehow?
> 
> 
> ---
> You are currently subscribed to luau as: whatever at whoever.net
> To unsubscribe send a blank email to $subst('Email.Unsub')



More information about the LUAU mailing list