1834218 Members
3681 Online
110066 Solutions
New Discussion

find command

 
hitesh567
Occasional Contributor

find command

my .usr filesystem is 100% full. I need to find what big files are occupying the space is /usr. What arguments I need to use with find command..?
6 REPLIES 6
Pete Randall
Outstanding Contributor

Re: find command

find /usr/* |sort -n

The last files listed will be your largest ones.


Pete

Pete
Oviwan
Honored Contributor

Re: find command

Hey and welcome.

use this:

10 largest directories:
$ du -kx /usr | sort -rn -k1 | head -n 10

10 largest files:
$ find /usr -type f -xdev -print | xargs -e ll | sort -rn -k5 | head -n 10

Recently modified files :
$ find /usr -type f -xdev -mtime -1 -print | xargs ll | sort -rn -k5

Regards

p.s. as you are new in this forum, don't forget to assign points.
hitesh567
Occasional Contributor

Re: find command

tnks Oviwan ,it was really helpful
lawrenzo_1
Super Advisor

Re: find command

This is whaty I use:

find /usr -xdev |xargs ls -ld |sort -rnk5 |more

will list all files in /usr largest file first.

hth

Chris
hello
hitesh567
Occasional Contributor

Re: find command

tnks
MarkSyder
Honored Contributor

Re: find command

If people's suggestions helped you you should award points. That way, if someone has the same problem as you in the future and finds your thread, they can see which answer was the most helpful (the one you give most points to).

No points for this post please.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing