Operating System - HP-UX
1753797 Members
8740 Online
108805 Solutions
New Discussion юеВ

Re: Easy points for all...

 
SOLVED
Go to solution
Robin Wakefield
Honored Contributor

Re: Easy points for all...

Hi,

One point to remember. When you ask find to process a lot of files, the "xargs" method is a lot more efficient, because it will collect the filenames as multiple arguments within one command (or as many as will fit per line). "-exec" will spawn one process per file.

Rgds, Robin.

Bill Hassell
Honored Contributor

Re: Easy points for all...

Before you go looking for large files, you should always start by looking for big directories. Big directories are more important since they may not contain big files but instead, contain hundreds or thousands of smaller files and they may need to be purged. Use this:

du -kx . | sort -rn > /tmp/du.root

Now the largest directories will be at the top. Note that the root filesystem must have only 3 big directories: /sbin /etc /dev. Any other big directory is in the wrong place and must be moved. And /dev should be less than 100, typically less than 50. If it is very large, there is a mistake, usually a misspelled device file such as /dev/rmt/om rather than 0m.

Now / may be your root's $HOME directory in which case, root's home may contain a lot of unnecessary files. To make things easier to identify and to remove the possibility of a mistake using rm, move root's $HOME to another directory, perhaps /root.


Bill Hassell, sysadmin

Re: Easy points for all...

To Paula
Excuse me for small points - your message was useful and late answer - my internet traffic has been low. :(
How I can "to compensate" it?

Oleg