Reply to post: Re: powershell command missing

Jeffrey Snover claims Microsoft demoted him for inventing PowerShell

blaisem

Re: powershell command missing

nix users will only see cmdlet names as an unnecessary waste of space, because they live in a world where all the commands are 2-3 letters that everyone understands because they've seen them for decades. Might as well use aliases for the sake of comparison:

gci | % {@{ $_.name = (gci $_ -R | Measure Length -Sum).sum}} | sort [Keys|Values]

You can sort by Keys (filename) or values (filesize). It's not bad for a native implementation without a dedicated standalone like du. If you wanted to make it really pretty and do it properly then you could treat yourself to a dozen kilobytes of code in your profile to write a proper function. Depending on the skill of the implementation, the flexibility and intuition of it would quickly outstrip what du offers.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon