File formats

Hi,

i would like to ask if someone knows an useful link or documentation where it’s possible to read the differents file formats in Linux.

for instance:
wtmp file has the format data. (file /var/log/wtmp).
messages file has the format ASCII text…
I would like to know what this formats stands for? If the messages file has the data format, what could happens?

Tks,
Checo

I’m not sure your question is really that specific to Linux. Practically all OS support application “viewers” which can be invoked to inspect different types of files (eg text, multimedia, image, etc). And, all OS will create temporary files when a file is initially modified but the changes not yet committed.

Perhaps more useful might be to take a look at how automatic a Desktop can invoke the proper viewer for a particular type of file, here is the official documentation for KDE

http://docs.kde.org/stable/en/kdebase-runtime/kcontrol/filetypes/

Usually you don’t and shouldn’t delve into uncommon file formats, they often are created by and/or used by the OS as part of its normal operation.

HTH,
Tony

On 2011-02-22 01:06, checoturco wrote:
>
> Hi,
>
> i would like to ask if someone knows an useful link or documentation
> where it’s possible to read the differents file formats in Linux.

Not that I know, but IMHO this is not a question appropriate for this
subforum. This is for network or internet questions.

In general, search in the manuals of the program that generates that file,
continue reading its source code.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

To begin with: why is this in the Network/Intyernet sub-forum?

Then. I guess that you are talking about information output by the file tool. Is that correct?

Hi guys,

you right, was a mistake from my part, this post shouldn’t be posted here.

Henk, it´s correct, i´m talking about the outup of the file command.

I know that some commands will read it’s information in the file wtmp (like last). Imagine that this file has the ASCII format like messages file, i don’t konw if it will be possible to the command last read this file with this format. I just would like to read something about this format for these files.

I will appreciate your answers and maybe the owner of this form can move this post to the correct section

Thanks

Checo.

Will move this thread to Programming/Scripting. Guess that is a better place.
Please do not post here until it is moved.

The thread is moved now.

@checoturco

Most of the time you can find documentation about all sorts of tools and files in their man pages.

Thus when you do

man find

you will get documentation that explains how find comes to it’s conclusions. In your case the last sentence is important:

Any file that cannot be identified as having been written in any of the character sets listed above is simply said to be ‘data’

In other words, this is no particular type that file recognisez, it is just a file with contents :wink:

Also when you do

man wtmp

you will get an explanation about the contents and meaning of the wtmp (and utmp) files.

HTH

On 2011-02-23 23:06, hcvv wrote:
> Will move this thread to Programming/Scripting. Guess that is a better
> place.
> Please do not post here until it is moved.

Please, when you do this, let your post time to be gated out to the NNTP
side before you do the actual move - which means:

post
wait till the minute 8 or 38 of the hour
do the move.

Alternatively:

post
move
post again, separately, via NNTP.

In the old thread there is no notice that the thread was moved, and we NNTP
users might still post there, unawares.

This time I found out by mere chance.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)