On Sep 18, 10 04:24, "Jérôme M. Berger" wrote:
KennyTM~ wrote:
On Sep 17, 10 02:26, "Jérôme M. Berger" wrote:
[-snip-]
This describes the file(1) command, which the job is to inspect the file
content and conclude what kind of file it actually is.
I suggest you re-read the paragraph I posted. Although it was taken
from the "file" web site, it states clearly that other apps look at
the file contents instead of the extension. Of course, some apps
don't care about the file type but some do. And most of those that
do care don't use the extension.
Many apps in Windows doesn't care about the file extension too. You can
rename a bitmap to 'file.txt' and still can open it in MS Paint. This is
irrelevant to UNIX.
But this is just one particular UNIX command. The command line interface
in general does not care about the type of a regular file. This is
needed in the GUI, but it is outside of the common parts of UNIX. There
is no rule saying that a file manager must use file(1) or MIME type or
extensions to determine the file type.
True, but then, there is no rule that says that on windows a file
manager must use the extension. However, on Windows, all the file
managers I've tried have used the extension (actually, most of the
time they don't use the extension themselves, they simply ask
Windows to open the file and Windows uses the extension), whereas on
UNIX most file managers use the file contents (usually, they don't
use the file command, but instead rely on libmagic directly) and
most applications will ignore the extension when asked to open a
file (OK, some Windows applications do that too but on *NIX most of
them do).
Jerome
Mac OS X is UNIX. Finder cares about the file extension (besides metadata).