- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- du -sk * taking long time
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
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
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
01-23-2014 04:54 AM
01-23-2014 04:54 AM
Hi ,
We have 11iv2 server rx2660 4c/16gb ram.
Our root filesystem is 83% full , we would like to trim it to 70% .
For which we have ran du -sk *|sort -n at root prompt ,
but its taking too much of time since we havae a filesystem which very deep , is there any way by which i can skip this filesystem and get the o/p of other directories and files ????
am sure there is some file or directory which is consuming unnneded space .
I need to find it .
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2014 10:48 AM - edited 01-25-2014 05:21 AM
01-23-2014 10:48 AM - edited 01-25-2014 05:21 AM
Solution>> Our root filesystem is 83% full , we would like to trim it to 70% .
The root filesystem should be virtually static. If anything is growing, it is probably in the wrong directory (logs, junk files, bad installations, etc).
>> For which we have ran du -sk *|sort -n at root prompt ,
Leave off -s because all you'll see are the first level directories.
Use this command instead:
du -kx / | sort -rn | head -20
The two largest directories *must* be /etc and /sbin. Anything else does not belong in /.
>> a filesystem which very deep , is there any way by which i can skip this filesystem and get the o/p of other directories and files ????
First problem: you have a bad filesystem that should not be in /
Most likely this bad filesystem is the problem and should be moved to another location (ie, /var).
It should be examined to see why the directory is so deep and perhaps redesigned or cleaned up.
If this problem directory must exist in /, move the directory to /var, then make a symbolic link to point to the new location, like this:
mv /badDirectory /var
ln -s /var/badDirectory /badDirectory
Second, you can run separate du commands on selected top level directories:
Make sure the directory is local to the root directory and not a mount point (like /var /opt...)
du -kx /etc /sbin /root | sort -rn | head -20
The root directory is critical to the system's health. The root home directory must NEVER be in /.
At least create a /root directory and change /etc/passwd to reflect root's new home.
Also, there should be *NO* files in /, only directories. No core files, junk files, temp files, or as I call them "root droppings". If the files are to be accesible using the original path (/), use a symlink as mentioned above and move the files to a more stable location.
All Unix-style systems need root's home moved out of /, and the contents of / should be restricted to stable directories like /etc and /sbin. Note that if /dev is more than a few hundred bytes (not kBytes), someone misspelled a device name, typically a tape drive (/dev/rmt/om is not the same /dev/rmt/0m). The /dev directory must have *NO* files in it, so search for the bad files like this:
find /dev -type f -exec ll {} \+
There should be nothing found.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2014 12:55 AM - edited 01-24-2014 12:56 AM
01-24-2014 12:55 AM - edited 01-24-2014 12:56 AM
Re: du -sk * taking long time
>find /dev -type f -exec ll {} \*
Did you intend the above to be "\;"? Instead, this will be much faster if using "+":
find /dev -type f -exec ll {} +
You can correct typos using: Post Options > Edit Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2014 07:30 PM
01-24-2014 07:30 PM
Re: du -sk * taking long time
an easy place to look at is in /root/home/ and zero out everyone's .sh_history file...that should trim some fat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2014 05:23 AM
01-25-2014 05:23 AM
Re: du -sk * taking long time
>> Did you intend the above to be "\;"? Instead, this will be much faster if using "+":
Yep, obviously I have a defective keyboard... ;-)
Bill Hassell, sysadmin