How can I modify the default ls
(Get-ChildItem
) in PowerShell so that it displays human-readable file sizes, like ls -h
on a *nix machine?
ls -lh
does simple logic with the file size, so that it shows bytes for really small files, kilobytes for files over 1K (with one decimal place if it's under 10K), and megabytes for files over 1M (with one decimal place if it's under 10MB).
Best Answer
try this
you can also use dynamic type data with PS3: