And you're missing {} which gets replaced by the file name. So it goes:
Code:
find . -name *.* -exec du -h {} \;
-name *.* => that matches any file which has a dot in it. As not every file in Unix has a dot that is probably not what you want. If you do not specify the -name parameter find assumes that you want to find files of any name.
du -h => gives you some human-readable form of the size. But how to compare this? Your task will be much easier when you set some metric here, e.g. megabytes
So we'll for first end up with:
Code:
find . -exec du -m {} \;
That way you'll run into the problem that find does not only find files but also directories which are of course bigger than the files they contain. Have a look at the man page of find for how to specify the type.
Approach is "correct" so far. Missing out "{} \;" is a typical beginner's mistake as the man page is not very kind to novices at this point.