Skip to content

Instantly share code, notes, and snippets.

@phosphene
Created January 8, 2011 20:53
Show Gist options
  • Save phosphene/771145 to your computer and use it in GitHub Desktop.
Save phosphene/771145 to your computer and use it in GitHub Desktop.
du -ch piped to ack find dir outputs with Gig multiples and hundreds of megs
[root@phosphene /]# du -ch | ack "^[\d\.]+?G|^\d{3,4}M"
@phosphene
Copy link
Author

du -ch pipe to
ack

[\d.]+?G

one or more digit character or literal dot followed by G

\d{3,4}M

notable that megabytes sometime represented as 1008M, hence \d{3,4} 3 or 4 digit chars then M

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment