- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- finding large files
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
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
тАО03-22-2004 08:34 AM
тАО03-22-2004 08:34 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2004 08:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2004 08:38 AM
тАО03-22-2004 08:38 AM
Re: finding large files
find /var -size +10000000c -print
for files > 10M
Or try the following to see hogs in descending order
du -akx /var | sort -nr | more
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2004 08:38 AM
тАО03-22-2004 08:38 AM
Re: finding large files
usage:
./bigfiles
./bigfiles /root 1000000
#cat bigfiles
------------------------------cut here-------------------------
# cat bigfiles
# To find any file over a certain size in a given directory
# Primarily used to locate files which might be running a filesystem out of
# space.
#
# First parameter is the filesystem or directory to begin the search from
# Second parameter is the size of the file, in characters, to find
#
if [ $# -eq 2 ]
then
if [ -d $1 ]
then
#ls -l `find "${1}" -xdev -size +"${2}"c -print`
find "${1}" -xdev -size +"${2}"c -print > /tmp/crslist$$
if [ -s /tmp/crslist$$ ]
then
ls -l `cat /tmp/crslist$$`
else
echo "apparently no files that large in "${1}
exit
fi
else
echo "$1 is not a directory...try again"
exit
fi
else
echo "\n\nbigfiles requires 2 parameters..."
echo "\tthe first is the beginning directory"
echo "\tthe second is the size of the file to search for\n\n"
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2004 08:39 AM
тАО03-22-2004 08:39 AM
Re: finding large files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2004 11:47 AM
тАО03-22-2004 11:47 AM
Re: finding large files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2004 12:58 PM
тАО03-22-2004 12:58 PM
Re: finding large files
du -kx /var | sort -rn | more
The few directories at the top of the list are the ones to look at. There may be a directory that has 10,000 files that are 1meg in size...that's 10Gb but not a single big file at all. Here are some typical scenarios:
/var/adm/sw (patches and installed s/ware--use cleanup)
/var/adm (logfiles)
/var/spool/lp/request (spooler files)
/var/mail(email files)
Once you've found a big directory, use ll to sort by size:
ll | sort -rnk5 | more
Now you can effectively cleanup the results. If your /var is less than 1Gb, double it and then create a trim script for cron to run each day.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2006 02:06 AM
тАО06-09-2006 02:06 AM
Re: finding large files
this command find files > to 10 mb and list.
Bye.
J.E.A.