File command does not generaly help detect corrupted files.
Right, but if it tells you that it is a kernel image at least you know that it is not still gzipped and that the user did not accidentally select the wrong file. -Mike
Ah, the Unix version of uploading utility could check whether the file is in some of several compressed formats, call apropriate decompressor, perhaps check whether the result is indeed executable with correct magic... I haven't thought of that.
Which reminds me: it would be nice to incorporate an option in the file command to check whether every occurence of LF is preceded by CR (in the whole file or reasonably long first part of it), and, if magic otherwise points to binary file, warns of possible ftp corruption.
Actually, uploader could do that check, following the check for the correct magic (note for non-unixers: magic is nothing more than few bytes of signature - characteristic content - the file command uses to recognise.file types).
Cheers!
Dragi "Bonzi" Raos
Zagreb, Croatia
Q#5196, MkII#80000376, 18GB green
_________________________
Dragi "Bonzi" Raos
Q#5196
MkII #080000376, 18GB green
MkIIa #040103247, 60GB blue