unix tip of the day

Started by Bloody Jack Kidd, January 22, 2010, 09:15:23 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bloody Jack Kidd

because of slight syntax variations from one OS to another, YMMV, but in BSD this works like a charm.

How to find the size of every specific type of file in a directory and all sub-directions, plus the total size of them all combined:

#find . -name "*.MYI" | xargs du -h -c

The above example finds MySQL index files and was executed from /var/db/mysql
Sysadmin - Parallel42