Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

How to determine directories taking the most disk space

0

1

Article ID: KB25144 KB Last Updated: 30 Jun 2020Version: 4.0
Summary:

This article shows how to check the file sizes and view the largest size directories on the Junos device for troubleshooting or informational purposes.

Symptoms:

The "Request system storage cleanup" command frees the necessary disk space needed for SRX operations. However, if this is not enough, and an administrator will need to work with JTAC in freeing disk space.

Solution:

At the shell prompt, enter the "du -H | sort -rn | more" command to see the size of each directory, after logging your SSH/Console session.

Note that this will run from the current working directory, and list recursive sub directories. In the example below, it was started from the root (/) directory.


start shell
cd /
du -H | sort -rn | more

1242632 ./cf
809836 ./cf/packages
757544 ./var
566809 ./usr
376056 ./var/db
375312 ./cf/var
375240 ./cf/var/tmp
335328 ./var/db/idpd
312944 ./var/sw
312940 ./var/sw/pkg
252536 ./usr/sbin
213456 ./var/db/idpd/db
146824 ./usr/share
138512 ./usr/share/pfe
121412 ./var/db/idpd/db/dfa_cache
120434 ./usr/lib
89598 ./jail
53104 ./var/db/idpd/sec-download
51636 ./cf/root
45392 ./jail/html
43693 ./usr/lib/dd
41988 ./var/db/idpd/bins


This is a truncated listing, and just an example of some output from the / directory. Your actual values will vary.
Modification History:

2020-06-30: Article reviewed for accuracy; no changes required.

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search