DEV Community

mich0w0h
mich0w0h

Posted on

Shell: Print file types of all files in a directory

What I want to achieve

  • print file types such as ASCII text or directory in the shell
  • print all file types in a directory

Solution

Use the file command.

For example, to display the file types in the sample directory, enter this command;

$ file sample/*
Enter fullscreen mode Exit fullscreen mode

References

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more