From Wiki-UX.info

Wiki-UX / File Systems / How to create a file system usage report
Jump to: navigation, search

How to create a file system usage report

Contents

Abstract

This article presents several HP-UX Posix Shell scripts to create file system usage reports. Using these scripts, detailed information on the current file system usage obtain to assist on file system monitoring and capacity planning.

1. Obtain the total used space of a mounted file system.

export total=0
for used in $(bdf | grep -v used | awk '{print $3}')
do
total=$(expr $total + $used)
done; echo $total

Example:

# for used in $(bdf | grep -v used | awk '{print $3}')
> do
> total=$(expr $total + $used)
> done; echo $total
14153864

2. Obtain the total used space of a mounted file systems in MB.

export total=0
for used in $(bdf | grep -v used | awk '{print $3}')
do
total=$(expr $total + $used)
done
echo $(expr $total \/ 1024) MB

Example:

# for used in $(bdf | grep -v used | awk '{print $3}')
> do
> total=$(expr $total + $used)
> done
echo $(expr $total \/ 1024) MB# root@delta:> echo $(expr $total \/ 1024) MB
13822 MB

3. Determinate the current usage of directories on a file system is a common request. There are times when the information provied by bdf or plain du commands are not enough to pinpoint the source of data overflow. The following scripts allows to create a recursive directory report.

for dir in `find /var/tmp -type d`
do
echo "Number of files: "`ls -l $dir | wc -l`" Occupy space in Kb: "`du -ks $dir`
done

Example:

Occupy space in Kb: 8 /var/tmp/stm464/delta.cri.hp.com/logs/tools
Number of files: 2 Occupy space in Kb: 8 /var/tmp/stm464/delta.cri.hp.com/logs/tools/129
Number of files: 2 Occupy space in Kb: 8 /var/tmp/stm464/delta.cri.hp.com/logs/tools/129/info
Number of files: 5 Occupy space in Kb: 896 /var/tmp/ipfilter
Number of files: 6 Occupy space in Kb: 184 /var/tmp/ipfilter/catalog
Number of files: 7 Occupy space in Kb: 48 /var/tmp/ipfilter/catalog/dfiles
Number of files: 2 Occupy space in Kb: 8 /var/tmp/ipfilter/catalog/B9901AA
Number of files: 2 Occupy space in Kb: 8 /var/tmp/ipfilter/catalog/B9901AA/pfiles
Number of files: 6 Occupy space in Kb: 112 /var/tmp/ipfilter/catalog/IPF-HP
Number of files: 6 Occupy space in Kb: 40 /var/tmp/ipfilter/catalog/IPF-HP/pfiles
Number of files: 3 Occupy space in Kb: 16 /var/tmp/ipfilter/catalog/IPF-HP/IPF2-DLKM
Number of files: 3 Occupy space in Kb: 16 /var/tmp/ipfilter/catalog/IPF-HP/IPF2-DLKM.2
Number of files: 3 Occupy space in Kb: 16 /var/tmp/ipfilter/catalog/IPF-HP/IPF-DEMO
Number of files: 3 Occupy space in Kb: 16 /var/tmp/ipfilter/catalog/IPF-HP/IPF-MAN
Number of files: 1 Occupy space in Kb: 0 /var/tmp/ipfilter/B9901AA
Number of files: 5 Occupy space in Kb: 704 /var/tmp/ipfilter/IPF-HP
Number of files: 2 Occupy space in Kb: 168 /var/tmp/ipfilter/IPF-HP/IPF2-DLKM
Number of files: 2 Occupy space in Kb: 168 /var/tmp/ipfilter/IPF-HP/IPF2-DLKM/usr
Number of files: 2 Occupy space in Kb: 168 /var/tmp/ipfilter/IPF-HP/IPF2-DLKM/usr/conf
Number of files: 2 Occupy space in Kb: 168 /var/tmp/ipfilter/IPF-HP/IPF2-DLKM/usr/conf/mod
Number of files: 2 Occupy space in Kb: 224 /var/tmp/ipfilter/IPF-HP/IPF2-DLKM.2
Number of files: 2 Occupy space in Kb: 224 /var/tmp/ipfilter/IPF-HP/IPF2-DLKM.2/usr
Number of files: 2 Occupy space in Kb: 224 /var/tmp/ipfilter/IPF-HP/IPF2-DLKM.2/usr/conf
Number of files: 2 Occupy space in Kb: 224 /var/tmp/ipfilter/IPF-HP/IPF2-DLKM.2/usr/conf/mod
Number of files: 2 Occupy space in Kb: 216 /var/tmp/ipfilter/IPF-HP/IPF-DEMO
Number of files: 2 Occupy space in Kb: 216 /var/tmp/ipfilter/IPF-HP/IPF-DEMO/opt
Number of files: 2 Occupy space in Kb: 216 /var/tmp/ipfilter/IPF-HP/IPF-DEMO/opt/ipf
Number of files: 27 Occupy space in Kb: 216 /var/tmp/ipfilter/IPF-HP/IPF-DEMO/opt/ipf/examples
Number of files: 2 Occupy space in Kb: 96 /var/tmp/ipfilter/IPF-HP/IPF-MAN
Number of files: 2 Occupy space in Kb: 96 /var/tmp/ipfilter/IPF-HP/IPF-MAN/opt
Number of files: 2 Occupy space in Kb: 96 /var/tmp/ipfilter/IPF-HP/IPF-MAN/opt/ipf
Number of files: 5 Occupy space in Kb: 96 /var/tmp/ipfilter/IPF-HP/IPF-MAN/opt/ipf/man
Number of files: 4 Occupy space in Kb: 24 /var/tmp/ipfilter/IPF-HP/IPF-MAN/opt/ipf/man/man1
Number of files: 3 Occupy space in Kb: 16 /var/tmp/ipfilter/IPF-HP/IPF-MAN/opt/ipf/man/man4
Number of files: 3 Occupy space in Kb: 24 /var/tmp/ipfilter/IPF-HP/IPF-MAN/opt/ipf/man/man5
Number of files: 5 Occupy space in Kb: 32 /var/tmp/ipfilter/IPF-HP/IPF-MAN/opt/ipf/man/man8

4. The following script uses printf and sort commands to provied a sorted & cleaner directory usage per file system report. It takes longer to generate because all the data must be collected first to sort the values.

printf "%-4s %10s %s\n" "File(s)" "USAGE (KB)" "DIRECTORY"; \
for dir in `find /var/tmp -type d`
do
printf "%7d %10d %-61s\n" `ls -1 $dir | wc -l` `du -ks $dir`
done | sort -r -k 2,2

Example:

File(s) USAGE (KB) DIRECTORY
     17      46656 /var/tmp
      4        896 /var/tmp/ipfilter
      4        704 /var/tmp/ipfilter/IPF-HP
      3        352 /var/tmp/stm464
      2        328 /var/tmp/stm464/delta.cri.hp.com
      1        320 /var/tmp/stm464/delta.cri.hp.com/data
      1        224 /var/tmp/ipfilter/IPF-HP/IPF2-DLKM.2/usr/conf/mod
      1        224 /var/tmp/ipfilter/IPF-HP/IPF2-DLKM.2/usr/conf
      1        224 /var/tmp/ipfilter/IPF-HP/IPF2-DLKM.2/usr
      1        224 /var/tmp/ipfilter/IPF-HP/IPF2-DLKM.2
     26        216 /var/tmp/ipfilter/IPF-HP/IPF-DEMO/opt/ipf/examples
      1        216 /var/tmp/ipfilter/IPF-HP/IPF-DEMO/opt/ipf
      1        216 /var/tmp/ipfilter/IPF-HP/IPF-DEMO/opt
      1        216 /var/tmp/ipfilter/IPF-HP/IPF-DEMO
      5        184 /var/tmp/ipfilter/catalog
      1        168 /var/tmp/ipfilter/IPF-HP/IPF2-DLKM/usr/conf/mod
      1        168 /var/tmp/ipfilter/IPF-HP/IPF2-DLKM/usr/conf
      1        168 /var/tmp/ipfilter/IPF-HP/IPF2-DLKM/usr
      1        168 /var/tmp/ipfilter/IPF-HP/IPF2-DLKM
      5        112 /var/tmp/ipfilter/catalog/IPF-HP
      4         96 /var/tmp/ipfilter/IPF-HP/IPF-MAN/opt/ipf/man
      1         96 /var/tmp/ipfilter/IPF-HP/IPF-MAN/opt/ipf
      1         96 /var/tmp/ipfilter/IPF-HP/IPF-MAN/opt
      1         96 /var/tmp/ipfilter/IPF-HP/IPF-MAN
      6         48 /var/tmp/ipfilter/catalog/dfiles
      5         40 /var/tmp/ipfilter/catalog/IPF-HP/pfiles
      4         32 /var/tmp/ipfilter/IPF-HP/IPF-MAN/opt/ipf/man/man8
      3         24 /var/tmp/ipfilter/IPF-HP/IPF-MAN/opt/ipf/man/man1
      2         24 /var/tmp/ipfilter/IPF-HP/IPF-MAN/opt/ipf/man/man5
      2         16 /var/tmp/ipfilter/catalog/IPF-HP/IPF2-DLKM.2
      2         16 /var/tmp/ipfilter/catalog/IPF-HP/IPF2-DLKM
      2         16 /var/tmp/ipfilter/catalog/IPF-HP/IPF-MAN
      2         16 /var/tmp/ipfilter/catalog/IPF-HP/IPF-DEMO
      2         16 /var/tmp/ipfilter/IPF-HP/IPF-MAN/opt/ipf/man/man4
      2          8 /var/tmp/stm464/tmp
      1          8 /var/tmp/stm464/delta.cri.hp.com/logs/tools/129/info
      1          8 /var/tmp/stm464/delta.cri.hp.com/logs/tools/129
      1          8 /var/tmp/stm464/delta.cri.hp.com/logs/tools
      1          8 /var/tmp/stm464/delta.cri.hp.com/logs
      1          8 /var/tmp/ipfilter/catalog/B9901AA/pfiles
      1          8 /var/tmp/ipfilter/catalog/B9901AA
      0          0 /var/tmp/stm02936415048
      0          0 /var/tmp/ripngd
      0          0 /var/tmp/ramd
      0          0 /var/tmp/isisd
      0          0 /var/tmp/ipfilter/B9901AA
      0          0 /var/tmp/image
      0          0 /var/tmp/ign_configure
      0          0 /var/tmp/hsperfdata_root
      0          0 /var/tmp/bgpd
  • Note: If you want to restrict the report to a single mount point, just add -xdev flag to the find command.

Report root (/) file system usage

The root file system needs special considerations when creating reports, because in HP-UX, is a central depository for all the mount points LVM and VxVM alike.

1. The following script limits the search to only the default directories created under / file system.

for dir in `find /sbin -type d` `find /dev -type d` `find /etc -type d`
do
echo "Number of files: "`ls -l $dir | wc -l`" Occupy space in Kb: "`du -ks $dir`
done

Example:

# for used in $(bdf | grep -v used | awk '{print $3}')
> do
> total=$(expr $total + $used)
> done
echo $(expr $total \/ 1024) MB# root@delta:> echo $(expr $total \/ 1024) MB
13822 MB
# root@delta:>  `find /dev -type d` `find /etc -type d`                      <
> do
> wc -l`" Occupy space in Kb: "`du -ks $dir`                                 <
> done
Number of files: 151 Occupy space in Kb: 91608 /sbin
Number of files: 11 Occupy space in Kb: 53040 /sbin/fs
Number of files: 10 Occupy space in Kb: 3288 /sbin/fs/hfs
Number of files: 21 Occupy space in Kb: 24144 /sbin/fs/vxfs
Number of files: 2 Occupy space in Kb: 448 /sbin/fs/vxfs/unsupported
Number of files: 3 Occupy space in Kb: 352 /sbin/fs/lofs
Number of files: 4 Occupy space in Kb: 736 /sbin/fs/cdfs
Number of files: 5 Occupy space in Kb: 296 /sbin/fs/nfs
Number of files: 3 Occupy space in Kb: 64 /sbin/fs/autofs
Number of files: 4 Occupy space in Kb: 208 /sbin/fs/cachefs
Number of files: 24 Occupy space in Kb: 23072 /sbin/fs/vxfs5.0
Number of files: 2 Occupy space in Kb: 912 /sbin/fs/vxfs5.0/unsupported
Number of files: 3 Occupy space in Kb: 0 /sbin/fs/cifs
Number of files: 8 Occupy space in Kb: 544 /sbin/lib
Number of files: 5 Occupy space in Kb: 32 /sbin/lib/mfsconfig.d
Number of files: 3 Occupy space in Kb: 8 /sbin/fsdaemondir
Number of files: 2 Occupy space in Kb: 0 /sbin/fsdaemondir/SOCKETS
Number of files: 131 Occupy space in Kb: 1280 /sbin/init.d
Number of files: 112 Occupy space in Kb: 8 /sbin/rc2.d
Number of files: 88 Occupy space in Kb: 8 /sbin/rc1.d
Number of files: 8 Occupy space in Kb: 8 /sbin/rc0.d
Number of files: 13 Occupy space in Kb: 8 /sbin/rc3.d
Number of files: 1 Occupy space in Kb: 0 /sbin/rc4.d
Number of files: 9 Occupy space in Kb: 144 /sbin/set_parms.d
Number of files: 13 Occupy space in Kb: 8 /sbin/SnmpAgtStart.d
Number of files: 2 Occupy space in Kb: 8 /sbin/ch_hostname.d
Number of files: 2 Occupy space in Kb: 0 /sbin/ch_ip_address.d
Number of files: 246 Occupy space in Kb: 96 /dev
Number of files: 20 Occupy space in Kb: 8 /dev/vg00
Number of files: 8 Occupy space in Kb: 8 /dev/dsk
Number of files: 8 Occupy space in Kb: 8 /dev/rdsk
Number of files: 10 Occupy space in Kb: 8 /dev/diag
Number of files: 10 Occupy space in Kb: 8 /dev/disk
Number of files: 8 Occupy space in Kb: 8 /dev/rdisk
Number of files: 3 Occupy space in Kb: 0 /dev/lvm_private
Number of files: 62 Occupy space in Kb: 8 /dev/ptym
Number of files: 61 Occupy space in Kb: 8 /dev/pty
Number of files: 121 Occupy space in Kb: 8 /dev/pts
Number of files: 1 Occupy space in Kb: 0 /dev/screen
Number of files: 1 Occupy space in Kb: 0 /dev/telnet
Number of files: 1 Occupy space in Kb: 0 /dev/hid
Number of files: 3 Occupy space in Kb: 0 /dev/deviceFileSystem
Number of files: 20 Occupy space in Kb: 8 /dev/vg01
Number of files: 2 Occupy space in Kb: 0 /dev/vg05
Number of files: 2 Occupy space in Kb: 0 /dev/vg04
Number of files: 277 Occupy space in Kb: 39912 /etc
Number of files: 25 Occupy space in Kb: 34504 /etc/opt
Number of files: 3 Occupy space in Kb: 48 /etc/opt/swm
Number of files: 4 Occupy space in Kb: 168 /etc/opt/samba
Number of files: 9 Occupy space in Kb: 136 /etc/opt/samba/messages
Number of files: 2 Occupy space in Kb: 40 /etc/opt/hp
Number of files: 6 Occupy space in Kb: 40 /etc/opt/hp/sslshare
Number of files: 1 Occupy space in Kb: 0 /etc/opt/hp/sslshare/cimserver_trust
Number of files: 12 Occupy space in Kb: 19024 /etc/opt/resmon
Number of files: 26 Occupy space in Kb: 208 /etc/opt/resmon/dictionary
Number of files: 21 Occupy space in Kb: 7424 /etc/opt/resmon/lbin
Number of files: 10 Occupy space in Kb: 10208 /etc/opt/resmon/lib
Number of files: 2 Occupy space in Kb: 136 /etc/opt/resmon/lib/nls
Number of files: 2 Occupy space in Kb: 136 /etc/opt/resmon/lib/nls/msg
Number of files: 6 Occupy space in Kb: 136 /etc/opt/resmon/lib/nls/msg/C
Number of files: 3 Occupy space in Kb: 0 /etc/opt/resmon/lock
Number of files: 8 Occupy space in Kb: 952 /etc/opt/resmon/log
Number of files: 8 Occupy space in Kb: 64 /etc/opt/resmon/monitors
Number of files: 24 Occupy space in Kb: 72 /etc/opt/resmon/persistence
Number of files: 23 Occupy space in Kb: 8 /etc/opt/resmon/pipe
Number of files: 3 Occupy space in Kb: 16 /etc/opt/resmon/mof
Number of files: 7 Occupy space in Kb: 56 /etc/opt/resmon/xml
Number of files: 15 Occupy space in Kb: 296 /etc/opt/ldapux
Number of files: 7 Occupy space in Kb: 40 /etc/opt/ldapux/ug_templates
Number of files: 2 Occupy space in Kb: 8 /etc/opt/ldapux/licenses
Number of files: 9 Occupy space in Kb: 136 /etc/opt/ldapux/schema
Number of files: 5 Occupy space in Kb: 2304 /etc/opt/cifsclient
Number of files: 40 Occupy space in Kb: 2248 /etc/opt/cifsclient/unitables
Number of files: 3 Occupy space in Kb: 16 /etc/opt/cifsclient/pam
Number of files: 2 Occupy space in Kb: 8 /etc/opt/pfil
Number of files: 5 Occupy space in Kb: 24 /etc/opt/ipf
Number of files: 4 Occupy space in Kb: 24 /etc/opt/ipf/rpc.ipf
Number of files: 3 Occupy space in Kb: 16 /etc/opt/kwdb
Number of files: 3 Occupy space in Kb: 16 /etc/opt/gwlm
Number of files: 2 Occupy space in Kb: 8 /etc/opt/gwlm/conf
Number of files: 2 Occupy space in Kb: 0 /etc/opt/vse
Number of files: 1 Occupy space in Kb: 0 /etc/opt/vse/scripts
Number of files: 3 Occupy space in Kb: 576 /etc/opt/sec_mgmt
Number of files: 10 Occupy space in Kb: 560 /etc/opt/sec_mgmt/bastille
Number of files: 5 Occupy space in Kb: 56 /etc/opt/sec_mgmt/bastille/OSMap
Number of files: 2 Occupy space in Kb: 16 /etc/opt/sec_mgmt/bastille/OSMap/Modules
Number of files: 21 Occupy space in Kb: 360 /etc/opt/sec_mgmt/bastille/Questions
Number of files: 4 Occupy space in Kb: 88 /etc/opt/sec_mgmt/bastille/configs
Number of files: 1 Occupy space in Kb: 0 /etc/opt/sec_mgmt/bastille/configs/mx
Number of files: 6 Occupy space in Kb: 88 /etc/opt/sec_mgmt/bastille/configs/defaults
Number of files: 2 Occupy space in Kb: 8 /etc/opt/sec_mgmt/bastille/mx
Number of files: 3 Occupy space in Kb: 16 /etc/opt/sec_mgmt/spc
Number of files: 2 Occupy space in Kb: 8 /etc/opt/sec_mgmt/spc/newconfig
Number of files: 7 Occupy space in Kb: 64 /etc/opt/drd
Number of files: 2 Occupy space in Kb: 200 /etc/opt/gnome
Number of files: 52 Occupy space in Kb: 200 /etc/opt/gnome/gtk
Number of files: 2 Occupy space in Kb: 8 /etc/opt/OV
Number of files: 2 Occupy space in Kb: 8 /etc/opt/OV/share
Number of files: 2 Occupy space in Kb: 8 /etc/opt/OV/share/registration
Number of files: 2 Occupy space in Kb: 8 /etc/opt/OV/share/registration/C
Number of files: 2 Occupy space in Kb: 8 /etc/opt/OV/share/registration/C/perf
Number of files: 1 Occupy space in Kb: 0 /etc/opt/prm
Number of files: 3 Occupy space in Kb: 80 /etc/opt/swa
Number of files: 1 Occupy space in Kb: 0 /etc/opt/wlm
Number of files: 15 Occupy space in Kb: 144 /etc/opt/dce
Number of files: 1 Occupy space in Kb: 0 /etc/opt/dce/security
Number of files: 1 Occupy space in Kb: 0 /etc/opt/dce/zoneinfo
Number of files: 4 Occupy space in Kb: 32 /etc/opt/wbem
Number of files: 6 Occupy space in Kb: 40 /etc/opt/iCAP
Number of files: 2 Occupy space in Kb: 8 /etc/opt/ignite
Number of files: 7 Occupy space in Kb: 11400 /etc/opt/mx
Number of files: 83 Occupy space in Kb: 11352 /etc/opt/mx/config
Number of files: 7 Occupy space in Kb: 256 /etc/opt/mx/config/oracle
Number of files: 7 Occupy space in Kb: 56 /etc/opt/mx/config/EditSysCred
Number of files: 2 Occupy space in Kb: 8 /etc/opt/mx/config/MultiSystemPage
Number of files: 34 Occupy space in Kb: 440 /etc/opt/mx/config/StatusSource
Number of files: 9 Occupy space in Kb: 72 /etc/opt/mx/config/SystemPage
Number of files: 3 Occupy space in Kb: 16 /etc/opt/mx/config/auth
Number of files: 5 Occupy space in Kb: 40 /etc/opt/mx/config/cache
Number of files: 6 Occupy space in Kb: 48 /etc/opt/mx/config/clustermon
Number of files: 50 Occupy space in Kb: 400 /etc/opt/mx/config/construction
Number of files: 11 Occupy space in Kb: 88 /etc/opt/mx/config/criteria
Number of files: 40 Occupy space in Kb: 3640 /etc/opt/mx/config/datacol
Number of files: 23 Occupy space in Kb: 1464 /etc/opt/mx/config/datacol/active
Number of files: 7 Occupy space in Kb: 56 /etc/opt/mx/config/discoveryGroupCred
Number of files: 7 Occupy space in Kb: 56 /etc/opt/mx/config/discoverySingleCred
Number of files: 93 Occupy space in Kb: 744 /etc/opt/mx/config/essentials
Number of files: 1 Occupy space in Kb: 8 /etc/opt/mx/config/essentials_pending
Number of files: 122 Occupy space in Kb: 976 /etc/opt/mx/config/icons
Number of files: 14 Occupy space in Kb: 296 /etc/opt/mx/config/identification
Number of files: 2 Occupy space in Kb: 8 /etc/opt/mx/config/identification/identifiers
Number of files: 5 Occupy space in Kb: 48 /etc/opt/mx/config/identification/noderelationships
Number of files: 2 Occupy space in Kb: 8 /etc/opt/mx/config/identification/snmp
Number of files: 16 Occupy space in Kb: 152 /etc/opt/mx/config/identification/wbemstm
Number of files: 2 Occupy space in Kb: 8 /etc/opt/mx/config/indications
Number of files: 2 Occupy space in Kb: 8 /etc/opt/mx/config/integrityextensions
Number of files: 2 Occupy space in Kb: 8 /etc/opt/mx/config/logs
Number of files: 2 Occupy space in Kb: 8 /etc/opt/mx/config/mngcomm
Number of files: 4 Occupy space in Kb: 24 /etc/opt/mx/config/mxdebug
Number of files: 2 Occupy space in Kb: 0 /etc/opt/mx/config/plugin
Number of files: 1 Occupy space in Kb: 0 /etc/opt/mx/config/plugin/CRA
Number of files: 9 Occupy space in Kb: 72 /etc/opt/mx/config/polling
Number of files: 6 Occupy space in Kb: 744 /etc/opt/mx/config/preload
Number of files: 2 Occupy space in Kb: 16 /etc/opt/mx/config/preload/51
Number of files: 3 Occupy space in Kb: 16 /etc/opt/mx/config/preload/51/addfiles
Number of files: 3 Occupy space in Kb: 264 /etc/opt/mx/config/preload/52
Number of files: 17 Occupy space in Kb: 264 /etc/opt/mx/config/preload/52/addfiles
Number of files: 1 Occupy space in Kb: 0 /etc/opt/mx/config/preload/52/removefiles
Number of files: 3 Occupy space in Kb: 24 /etc/opt/mx/config/preload/521
Number of files: 3 Occupy space in Kb: 24 /etc/opt/mx/config/preload/521/addfiles
Number of files: 1 Occupy space in Kb: 0 /etc/opt/mx/config/preload/521/removefiles
Number of files: 2 Occupy space in Kb: 56 /etc/opt/mx/config/preload/522
Number of files: 5 Occupy space in Kb: 56 /etc/opt/mx/config/preload/522/addfiles
Number of files: 3 Occupy space in Kb: 384 /etc/opt/mx/config/preload/53
Number of files: 9 Occupy space in Kb: 376 /etc/opt/mx/config/preload/53/addfiles
Number of files: 2 Occupy space in Kb: 8 /etc/opt/mx/config/preload/53/removefiles
Number of files: 5 Occupy space in Kb: 40 /etc/opt/mx/config/rackable
Number of files: 18 Occupy space in Kb: 648 /etc/opt/mx/config/reports
Number of files: 81 Occupy space in Kb: 1224 /etc/opt/mx/config/res
Number of files: 5 Occupy space in Kb: 96 /etc/opt/mx/config/sshtools
Number of files: 8 Occupy space in Kb: 64 /etc/opt/mx/config/sshtools/conf
Number of files: 4 Occupy space in Kb: 32 /etc/opt/mx/config/status
Number of files: 3 Occupy space in Kb: 16 /etc/opt/mx/config/vcm
Number of files: 7 Occupy space in Kb: 152 /etc/opt/mx/config/debugsettings
Number of files: 8 Occupy space in Kb: 64 /etc/opt/mx/config/certstor
Number of files: 21 Occupy space in Kb: 976 /etc/lvmconf
Number of files: 84 Occupy space in Kb: 680 /etc/rc.config.d
Number of files: 1 Occupy space in Kb: 0 /etc/cfs
Number of files: 3 Occupy space in Kb: 24 /etc/fs
Number of files: 3 Occupy space in Kb: 16 /etc/fs/modules
Number of files: 2 Occupy space in Kb: 8 /etc/fs/templates
Number of files: 2 Occupy space in Kb: 0 /etc/switch
Number of files: 14 Occupy space in Kb: 112 /etc/default
Number of files: 4 Occupy space in Kb: 48 /etc/net
Number of files: 3 Occupy space in Kb: 16 /etc/net/ticlts
Number of files: 3 Occupy space in Kb: 16 /etc/net/ticots
Number of files: 3 Occupy space in Kb: 16 /etc/net/ticotsord
Number of files: 4 Occupy space in Kb: 24 /etc/dfs
Number of files: 2 Occupy space in Kb: 8 /etc/nfs
Number of files: 3 Occupy space in Kb: 16 /etc/cmpt
Number of files: 2 Occupy space in Kb: 8 /etc/cmpt/examples
Number of files: 2 Occupy space in Kb: 8 /etc/cmpt/hardlinks
Number of files: 4 Occupy space in Kb: 24 /etc/priv-apps
Number of files: 6 Occupy space in Kb: 64 /etc/rbac
Number of files: 4 Occupy space in Kb: 224 /etc/vx
Number of files: 2 Occupy space in Kb: 8 /etc/vx/elm
Number of files: 5 Occupy space in Kb: 208 /etc/vx/licenses
Number of files: 1 Occupy space in Kb: 0 /etc/vx/licenses/dat
Number of files: 21 Occupy space in Kb: 184 /etc/vx/licenses/db
Number of files: 3 Occupy space in Kb: 24 /etc/vx/licenses/lic
Number of files: 1 Occupy space in Kb: 0 /etc/vx/licenses/reg
Number of files: 2 Occupy space in Kb: 8 /etc/lanmon
Number of files: 4 Occupy space in Kb: 32 /etc/audit
Number of files: 14 Occupy space in Kb: 944 /etc/X11
Number of files: 2 Occupy space in Kb: 8 /etc/X11/lbxproxy
Number of files: 2 Occupy space in Kb: 8 /etc/X11/proxymngr
Number of files: 2 Occupy space in Kb: 8 /etc/X11/fs
Number of files: 2 Occupy space in Kb: 0 /etc/cmcluster_callout
Number of files: 2 Occupy space in Kb: 0 /etc/cmcluster_callout/config
Number of files: 8 Occupy space in Kb: 184 /etc/mail
Number of files: 3 Occupy space in Kb: 64 /etc/SnmpAgent.d
Number of files: 12 Occupy space in Kb: 280 /etc/ppp
Number of files: 18 Occupy space in Kb: 160 /etc/ppp/Examples
Number of files: 10 Occupy space in Kb: 112 /etc/sam
Number of files: 2 Occupy space in Kb: 8 /etc/sam/custom
Number of files: 3 Occupy space in Kb: 8 /etc/sam/rsam
Number of files: 2 Occupy space in Kb: 8 /etc/sam/rsam/usr
Number of files: 1 Occupy space in Kb: 0 /etc/sam/rsam/grp
Number of files: 5 Occupy space in Kb: 32 /etc/skel
Number of files: 3 Occupy space in Kb: 16 /etc/local
Number of files: 4 Occupy space in Kb: 8 /etc/useracct
Number of files: 3 Occupy space in Kb: 8 /etc/vhelp
Number of files: 2 Occupy space in Kb: 0 /etc/vhelp/families
Number of files: 2 Occupy space in Kb: 0 /etc/vhelp/families/C
Number of files: 2 Occupy space in Kb: 8 /etc/vhelp/volumes
Number of files: 6 Occupy space in Kb: 8 /etc/vhelp/volumes/C
Number of files: 2 Occupy space in Kb: 8 /etc/acct
Number of files: 2 Occupy space in Kb: 8 /etc/vue
Number of files: 2 Occupy space in Kb: 8 /etc/vue/config
Number of files: 2 Occupy space in Kb: 8 /etc/vue/config/Xsession.d
Number of files: 1 Occupy space in Kb: 0 /etc/dhcpv6db
Number of files: 4 Occupy space in Kb: 24 /etc/gss
Number of files: 2 Occupy space in Kb: 8 /etc/ximian
Number of files: 2 Occupy space in Kb: 0 /etc/.java
Number of files: 3 Occupy space in Kb: 0 /etc/.java/.systemPrefs
Number of files: 9 Occupy space in Kb: 72 /etc/uucp
Number of files: 7 Occupy space in Kb: 344 /etc/lp
Number of files: 1 Occupy space in Kb: 0 /etc/lp/cinterface
Number of files: 1 Occupy space in Kb: 0 /etc/lp/class
Number of files: 1 Occupy space in Kb: 0 /etc/lp/info
Number of files: 5 Occupy space in Kb: 312 /etc/lp/interface
Number of files: 4 Occupy space in Kb: 256 /etc/lp/interface/model.orig
Number of files: 4 Occupy space in Kb: 24 /etc/lp/member
Number of files: 1 Occupy space in Kb: 0 /etc/lp/sinterface

2. The following script limits the search to the hidden files under/ file system.

for dir in `ls -d /.[a-zA-Z]*`
do
 if [ -d $dir ] ; then
    echo "Number of files: "`ls -l $dir | wc -l`" Occupy space in Kb: "`du -ks $dir`
 fi
done

Example:

Number of files: 2 Occupy space in Kb: 8 /.ssh
Number of files: 5 Occupy space in Kb: 104 /.sw
Number of files: 5 Occupy space in Kb: 10184 /.swa

Reference

Author

This page was last modified on 17 July 2010, at 02:43. This page has been accessed 2,293 times.