File command file returns the detected type of a file. Use Pass any file as a parameter for file to get the filetype $ file file.c file.c: C program text More man file file