I'm new to Linux and saw files named "example.cmd" and "test.com".
How do I open these files? Also, what kind of files are these?
I'm new to Linux and saw files named "example.cmd" and "test.com".
How do I open these files? Also, what kind of files are these?
As luke says, you should use the file
utility to try to find out the truth; but my best guess is that these are actually Windows scripts/executables that have somehow found their way onto a linux system.
This means there might not be much point opening them. Still, but you could just start by trying to run the command less example.cmd
or less test.com
, and if you just see garbage, try hexdump
. I don't know if that counts as "opening" in any useful sense, but at least you might find out something.
strings
on suspected binaries before using less
. But use file
first.
Dec 2, 2011 at 16:14
Try running the file command on the files, e.g:
file test.com
and see if it gives you any useful information.
less test.com
to view the contents of the file as @Adrian Ratnapala suggests.
Dec 2, 2011 at 16:27
Many cross-platform applications include both windows (.cmd) and unix/linux (.sh, etc) scripts, usually to start up an application. A bit more information about where you saw them, what the actual names are, etc would be needed to determine exactly what you're looking at.
.com files are a hold-over from the MS-DOS days.