Shell: Print file types of all files in a directory

mich0w0h

mich0w0h

Posted on January 3, 2024

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

๐Ÿ’– ๐Ÿ’ช ๐Ÿ™… ๐Ÿšฉ
mich0w0h
mich0w0h

Posted on January 3, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

ยฉ TheLazy.dev

About