I am ignorant as to whether ls
is capable of displaying a filetype column.
Doing a quick online search and searching the man
did not reveal such a capability. Is it capable of doing this?
Clarification: This is especially helpful if files do not have an extension.
Update
As of 2018-04-28 the answers have been quite interesting however they did not provide what I was looking for. More specifically,
-
file
does give the actual filetypes but it doesn't integrate well withls
. Specifically, I usels -lhtrpG --group-directories-first --color=always
-
ls -F
is anls
solution however it provides symbols not a column of actual filetypes.
For this reason I have not marked any of the answers as the answer I am looking for.
Best Answer
I think the best way to display a file type is using this command:
If you want to list the types of all files in a directory, just use:
For more details about the arguments, see: