sajad torkamani
file --mime <file>

Example output:

hello.txt: text/plain; charset=us-ascii
Tagged: Unix