Files consuming more space in HP-UX

Hi,

Could you please provide OS command to find large files in size MB and GB... under specific directory in HP-UX?

Regards,
Maddy

It is the find command, which is available in every Unix/Linux. Please try it out. You can get additional help using the command man find . If it doesn't work out, do not hesitate to ask here again.

Perhaps using find, think of listing out files by bytes rather than Mb or Gb you get with ls -lh and then sorting on the size column.

You might also consider using the du command something like this to find directories containing lots of data (potentially many small files or one huge one) from the current directory down, but not crossing into sub-mounted filesystems:-

du -kx .

Show us how you get on and illustrate with your code and sample output if it's not working for you.

I hope that these help,
Robin

For example, a find command that I have often used:
show all files in the file system mounted on / that are bigger than 10000 blocks (5000 kilobytes) and modified since less than 7 days

find / -xdev -size +10000 -mtime -7 -print

Run ls -ld on each of them

find / -xdev -size +10000 -mtime -7 -exec ls -ld {} \;

A command that gives a quick overview of the file systems

bdf
1 Like

Thank you