You can count files with ls | wc and you can count the number of lines (and words and characters) in files with wc filename As for the "difficult" part of the homework: Check what the file extensions are of most of the files with gibberish in their first lines. Another form of file similar to .exe files? You can use Win2K to help to find out what that extension means. Finally: yes, lump those files whose first line refers to the same kind of interpreter program into one category. Remark on whatever exceptions you find that don't seem to fit larger categories. Any best guesses what they are? One of the points of this exercise is to fumble around and to try to answer unclear questions, while learning about file systems, command types, shells in the process.