Difference between revisions of "HowTo One Liners"

From NST Wiki
Jump to navigationJump to search
(Overview)
(Find Largest Files With A File System)
Line 3: Line 3:
 
This page provides a quick reference to common '''One Liner''' administrative command line operations.
 
This page provides a quick reference to common '''One Liner''' administrative command line operations.
  
== Find Largest Files With A File System ==
+
== Find The Largest Files Within A File System ==
 
This example finds the 10 largest files using the "'''/var'''" top level directory:
 
This example finds the 10 largest files using the "'''/var'''" top level directory:
 
  [root@vortex wui]# find /var -printf '%s %p\n'| sort -nr | head -10
 
  [root@vortex wui]# find /var -printf '%s %p\n'| sort -nr | head -10

Revision as of 09:23, 23 June 2015

Overview

This page provides a quick reference to common One Liner administrative command line operations.

Find The Largest Files Within A File System

This example finds the 10 largest files using the "/var" top level directory:

[root@vortex wui]# find /var -printf '%s %p\n'| sort -nr | head -10
182947840 /var/lib/rpm/Packages
134217728 /var/log/journal/597d443ff603490286135ca186ed9c7d/system@f9cb0e593f6c413d8fdfaa88bd1c9f42-00000000000b1d98-0005092323239c17.journal
125829120 /var/log/journal/597d443ff603490286135ca186ed9c7d/system@f9cb0e593f6c413d8fdfaa88bd1c9f42-000000000008eadb-000506c496be90cb.journal
125829120 /var/log/journal/597d443ff603490286135ca186ed9c7d/system@f9cb0e593f6c413d8fdfaa88bd1c9f42-00000000000251f3-0004f57678d900a6.journal
125829120 /var/log/journal/597d443ff603490286135ca186ed9c7d/system@f9cb0e593f6c413d8fdfaa88bd1c9f42-0000000000000001-0004f10922bc1e86.journal
95967232 /var/cache/yum/x86_64/20/fedora/gen/primary_db.sqlite
83886080 /var/log/journal/597d443ff603490286135ca186ed9c7d/system@f9cb0e593f6c413d8fdfaa88bd1c9f42-0000000000077d06-00050460486ab015.journal
75497472 /var/log/journal/597d443ff603490286135ca186ed9c7d/system@f9cb0e593f6c413d8fdfaa88bd1c9f42-000000000004d2bc-0004fbc9efdbc627.journal
64720632 /var/lib/clamav/main.cvd
64256000 /var/cache/yum/x86_64/20/updates/gen/primary_db.sqlite