File

From Unix SME

File

File is a command used to see what kind of file a particular file is different kind of files including ASCII files, block special and character special etc special are created by printers and connected devices as well as terminals


Synopsis

file {option} {filename}


Usage Case

usage case would be when you are trying to find out things about a file without actually opening up a file

Examples

usage case example would be


file -v History.txt = shows ascii which is human readable


file /dev/port = character special


file cdrom (in dev directory)= shows symbolic link which means this particular file points to another file


file /log/run/systemd/journal/dev-log shows socket which means it is an end-point communication for a process running on the system