Friday, July 15, 2011

get the size of directory in AIX

If you have a directory structure made up a directory and sub directories (let us say 6) then the command that will give me the size of the entire directory structure can be calculated using following options,

ls -lR /your-directory | awk '{sum += $5}; END {print sum}'

you can also use du command,

du -sg /your-directory


Refrences:

  1. AIX 5L Administration
  2. Accelerating AIX: Performance Tuning for Programmers and Systems Administrators
  3. AIX Rs/6000: System and Administration Guide (J. Ranade Workstation Series)
  4. Essential System Administration

No comments:

Post a Comment