Webperforms the du, caches the results and shows them in a nice command line GUI, somewhat comparable to du -hc -d 1 sort -h. The initial indexing takes equally long as du, but looking for the actual "culprit" that fills up precious space is sped up, as all subdirectories have the initially cached du information available. Webfunction du ($path=".") { Get-ChildItem $path ForEach-Object { $file = $_ Get-ChildItem -File -Recurse $_.FullName Measure-Object -Property length -Sum Select-Object …
How To Check Disk Usage in Linux Tom
Webdu -hs * sort -h If you are using a sort that does not support -h, you can install GNU Coreutils. E.g. on an older Mac OS X: brew install coreutils du -hs * gsort -h From sort manual: -h, --human-numeric-sort compare human readable numbers (e.g., 2K 1G) Share Improve this answer Follow edited Jul 3, 2024 at 10:41 answered Jul 1, 2010 at 12:29 WebOct 29, 2024 · 4 Answers. Sorted by: 40. Use xargs (1) instead of -exec: find . -name bak -type d xargs du -ch. -exec executes the command for each file found (check the find (1) documentation). Piping to xargs lets you aggregate those filenames and only run du once. You could also do: find -name bak -type d -exec du -ch ' {}' \; +. hamilton sofa gallery locations
Linux Sort du -h (human-readable) Output By Size - nixCraft
WebMar 21, 2013 · The du command (the name is shortened from “disk usage”), as the name implies, will simply display, in its output, the amount of disk space being used by a … WebOct 25, 2024 · Steps to find Largest directories in Linux. du command : Estimate file space usage. sort command : Sort lines of text files or given input data. head command : Output the first part of files i.e. to display first 10 largest file. find command : Search file. WebApr 8, 2009 · du -s $i read k ( Edit - Testing this properly, it works fine in ksh but not in bash for some reason. I think it might be something to do with subshells. Use the backticks and cut solution below if you're using bash.) You could keep your backticks and use cut rather than read: k=`$du -s $i cut -f1` burn ps1 games to disc