Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

find immediatly under root (/)

Status
Not open for further replies.

pneumatic

Technical User
Aug 6, 2003
11
0
0
GB
hi...

any of you gurus out there know how to search for example big files immediately under root ignoring all of the other filesystems? as you know doing a find / -size +1000000c... give you the job lot.
i'm thinking maybe a loop using a grep -v against the $7 (Mounted on) field of the df -k output.

thanks in advance to those bothered to reply.
 
In the
Code:
 man find
output, look at the
Code:
 -mount
or
Code:
 -level
option.

Hope This Help
PH.
 
Try:
find / \( -type d ! -name . -prune \) -o \( -type f -size +1000000c \)

HTH


Dickie Bird (:)-)))
 
ls -l / | awk '/^-/ && $5 > 1000000'
 
hi all,

thanks for replying....some good ideas, though i think i
have misled you slightly (sorry!), when i said immediately under root i meant files including those in directories also belonging to the root filesystem eg /etc.
the "immediately under" bit though obviously not clear enough was to catch all files > 1000000 bytes EXCLUDING those under other mounted filesystems.
 

find / -mount -size +1000000c

CaKiwi

"I love mankind, it's people I can't stand" - Linus Van Pelt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top