skip to content
Alvin Lucillo

Check file type

/ 1 min read

You can check the file type of a file in a Linux distro with file command. For example, we have these files:

ls
google-chrome-stable-137.0.7151.119-1.x86_64.rpm  google-chrome-stable_current_amd64.deb
file ./*
./google-chrome-stable-137.0.7151.119-1.x86_64.rpm: RPM v3.0 bin i386/x86_64
./google-chrome-stable_current_amd64.deb:           Debian binary package (format 2.0), with control.tar.xz, data compression xz
# ...
/
file google-chrome-stable-137.0.7151.119-1.x86_64.rpm
google-chrome-stable-137.0.7151.119-1.x86_64.rpm: RPM v3.0 bin i386/x86_64
# ...
file google-chrome-stable_current_amd64.deb
google-chrome-stable_current_amd64.deb: Debian binary package (format 2.0), with control.tar.xz, data compression xz