get filetype linux code example Example 1: commandline print file type file filename Example 2: how to get file type in linux file <filename>