"List all files, showing file types."
To see all files in the current directory and their file type, try:
file ./*
Example:
$ file ./*
./apt.conf.d: directory
./listchanges.conf: ASCII text
./preferences.d: directory
./sources.list: ASCII text
./sources.list.d: directory
./trusted.gpg: GPG key public ring
The above shows a human-readable form of the file type. Alternatively, one can print the file's mime-type:
$ file --mime-type ./*
./apt.conf.d: inode/directory
./listchanges.conf: text/plain
./preferences.d: inode/directory
./sources.list: text/plain
./sources.list.d: inode/directory
./trusted.gpg: application/x-gnupg-keyring
file
does a cursory examination of the content of each file to determine its type. The default output, as shown in both examples above, includes the file name and the file type. For more information, see man file
.
file
ormimetype
commands).