- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Best method of finding large files in HP-UX
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-14-2001 03:15 AM
тАО03-14-2001 03:15 AM
Thanks for any assistance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-14-2001 03:27 AM
тАО03-14-2001 03:27 AM
Re: Best method of finding large files in HP-UX
in patches.
It describes how to use find and du to search
for large space users
To find particular files that are large
you'll use find with a -size option
Later,
Bill
--------------------------------------------------------------------------------
1) /var/tmp - used by some application. You may remove some files which are not accesed let's say in 7 days.
# find /var/tmp -atime +7 -exec rm {} ;
2) /var/adm/crash - system panics
Example: /var/adm/crash/core.0/core.0.1.gz
3) Perfview datafiles........ /var/opt/perf/datafiles.
CITEC HP TEAM
--------------------------------------------------------------------------------
Here is a one-liner (take out the \ and put it all on one line) that will help you narrow down which directories are taking the most space:
du -kx | awk -F/ 'NF==2' | sort -n
Run it in /var first, then run it again in the directories that show up at the bottom of the list.
The SD patch commit mentioned above is only relevant if /var/adm/sw is one of the directories that is causing your problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-14-2001 04:22 AM
тАО03-14-2001 04:22 AM
Re: Best method of finding large files in HP-UX
think of a way to search the entire file structure and find all huge files, while providing the path to them.
Thank you for your kind assistance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-14-2001 04:43 AM
тАО03-14-2001 04:43 AM
SolutionYou can try this quick and dirty script; let's name it bigfiles.sh:
--snip--
#!/bin/sh
if [ $# -eq 2 ]
then
find $1 -type f -xdev -size +$(expr "$2" \* 2) -exec ll -d {} \;
else
echo "Usage : ${0##*/}
fi
--snip--
Run it this way:
./bigfiles.sh /var 5000
HTH !
Best regards.
Fred.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-14-2001 04:53 AM
тАО03-14-2001 04:53 AM
Re: Best method of finding large files in HP-UX
To find files larger than some number
# find /var -size +10000c -exec ls -l {} \;
This would find all files in /var whose size in (c)haracters exceeds 10,000. An 'ls' listing of these files would be output to stdout.
Note the plus (+) argument denotes greater than; a minus (-) would mean less than and the absence of either sign would imply equal. The "c" signifies characters instead of blocks.
See the man pages for 'find' for more useful information.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-14-2001 05:54 AM
тАО03-14-2001 05:54 AM
Re: Best method of finding large files in HP-UX
Suppose if u want to find files, whose size is greater than 1MB:
# find /usr -type f -xdev -size +1000000c -exec ll {} \;
'c' after 1000000 indicates charactors(as charactor occupies one byte)
(+) indicates greater than and (-) indicates less than
You should use "-xdev" because it is a position-independent term that causes find to avoid crossing any file system mount points.(Means searches with in filesystem, e.g. if /usr/extra is another filesystem it won't goes into directory /usr/extra)
Hope this helps you.
Cheers...
Satish.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-14-2001 05:56 AM
тАО03-14-2001 05:56 AM
Re: Best method of finding large files in HP-UX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-14-2001 06:02 AM
тАО03-14-2001 06:02 AM
Re: Best method of finding large files in HP-UX
du -x|sort -rn|more
This makes a descending list of file and directory sizes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-14-2001 08:14 AM
тАО03-14-2001 08:14 AM
Re: Best method of finding large files in HP-UX
find / ! -local -prune -o -size +1000000c -exec ls -la {} \; | awk {'print $5, $9'}
If you are running 10.x then you'll have to use -xdev; else you'll start to crawl the NFS mounts.
Hope this helps...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-15-2001 06:53 AM
тАО03-15-2001 06:53 AM
Re: Best method of finding large files in HP-UX
When the core files constantly are saved in the same directory you could always create a directory (or whatever) with the name core. Do not forget to set the security. In this way, corefiles will not be saved!
Regards,
DD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-15-2001 06:53 AM
тАО03-15-2001 06:53 AM
Re: Best method of finding large files in HP-UX
When the core files constantly are saved in the same directory you could always create a directory (or whatever) with the name core. Do not forget to set the security. In this way, corefiles will not be saved!
Regards,
DD