[Aide] File type attribute

gentuxx gentuxx at gmail.com
Fri Oct 21 01:07:39 EEST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

jacob martinson wrote:

>What do you mean by file type? Unix doesn't have a file typing
>framework the way Windows does.
>
>-jacob
>
At the risk of going off-topic, Unix does recognize file types.  It
isn't the same type of system you allude to with Windows, i.e. file
extensions, but it knows the difference:

gentuxx at gentoo ~ $ file install-sparc64-universal-2005.1.iso
install-sparc64-universal-2005.1.iso: Sun disk label 'SPARC bootable
CD-ROM: Gentoo Linux SPARC64 2005.1' 0 blocks, boot block present
gentuxx at gentoo ~ $ file lastRSS.zip
lastRSS.zip: Zip archive data, at least v2.0 to extract
gentuxx at gentoo ~ $ file /usr/bin/ls
/usr/bin/ls: symbolic link to `/bin/ls'
gentuxx at gentoo ~ $ file /bin/ls
/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for
GNU/Linux 2.4.1, dynamically linked (uses shared libs), stripped


At the most fundamental level, it's binary or text.  It determines
file type based on the file header.  To the point of this discussion,
it might be handy to know that my install-sparc64-universal-2005.1.iso
is really:

gentuxx at gentoo ~ $ file scripts/install-sparc64-universal-2005.1.iso
scripts/install-sparc64-universal-2005.1.iso: perl script text executable

but if that were to actually happen, the ctime, mtime, (possibly)
inode, md5 hash, sha1 hash, etc. are all going to be different, which
would be flagged by 'aide -c'.

HTH

- -gen

>>Pete J. O'Hara wrote:
>>
>>>Hi,
>>>I am a newb and have searched around and it seems that AIDE doesn't
>>>distinguish the file "type" attribute. In the manual "The Aide database
>>>stores various file attributes including: permissions, inode number,
>>>user, group, file size, mtime and ctime, atime, growing size and number
>>>of links." Am I wrong in thing that file "type" isn't recognized?
>>>
>>>TIA,
>>>Pete
>
>_______________________________________________
>Aide mailing list
>Aide at cs.tut.fi
>https://mailman.cs.tut.fi/mailman/listinfo/aide
>


- --
gentux
echo "hfouvyAdpy/ofu" | perl -pe 's/(.)/chr(ord($1)-1)/ge'

gentux's gpg fingerprint ==> 34CE 2E97 40C7 EF6E EC40  9795 2D81 924A
6996 0993
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDWBUrLYGSSmmWCZMRAphNAJoDE1HsVFMZ8CiJzvDrT0VDP9XbugCcD3AM
nKQmeityIbksvQu2XmOLNII=
=Td/g
-----END PGP SIGNATURE-----



More information about the Aide mailing list