- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Finding large files in root
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2002 01:07 AM
тАО05-16-2002 01:07 AM
Finding large files in root
find . -xdev -size +1000000c -exec ls -l {} \l
My understanding was that the -xdev option would restrict the search to the root directory, but the output includes large files in other filesystems.
How best can I restrict the search to only files in root?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2002 01:17 AM
тАО05-16-2002 01:17 AM
Re: Finding large files in root
Hmm, thats strange. Ive tried your command on 2 different 10.20 and 11.0 servers and it works fine - it does NOT search mountpoints (/var, /usr, /opt etc.). It only searches root which includes /etc, /dev
What version of find are you running ? maybe a patch issue. Mine is Revision 82.3 (99/10/04)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2002 01:21 AM
тАО05-16-2002 01:21 AM
Re: Finding large files in root
1)Try sam
routine tasks
selective file removal
2)What are the file systems it enters.
If AFS this is third party
steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2002 01:27 AM
тАО05-16-2002 01:27 AM
Re: Finding large files in root
Thanks anyway.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2002 01:59 AM
тАО05-16-2002 01:59 AM
Re: Finding large files in root
A simple command I always use from the root of a FS is
du -akx | sort -nr | more
This WILL restrict to the FS & sort descending.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2002 02:05 AM
тАО05-16-2002 02:05 AM
Re: Finding large files in root
If you want to find the large files in a specific directory, then do this eg. for /:
# ll / | awk '{print $5,$9}' | while read size name ; do if [ "$size" -ge "1000000" ] ; then echo $name ; fi ; done
Tested that it works on my system. Hope this helps. Regards.
Steven Sim Kok Leong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2002 04:00 AM
тАО05-16-2002 04:00 AM
Re: Finding large files in root
du -kx / | sort -rn | more
It should look something like this:
33480 /
17896 /sbin
14454 /etc
9735 /etc/opt
5507 /etc/opt/resmon
3532 /sbin/fs
3456 /etc/opt/resmon/lbin
1657 /sbin/fs/vxfs
1454 /sbin/fs/hfs
1432 /etc/lvmconf
The vast majority of problems with the root filesystem filling up is due to a misspelled device file or a directory that does not belong in root. /dev should be about 25k to 45k when you run du:
du -s /dev
36 /dev
If /dev is much larger, use this to find the culprit:
find /dev -type f
Only device files belong in /dev.
Badly written applications will install (without asking permission from root) directories in the / filesystem--they don't belong there! The correct location is /opt. Here's a recent posting on the subject:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xac6d42308663d611abdb0090277a778c,00.html
Bill Hassell, sysadmin