linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* changing file's mode
@ 2003-07-23  8:46 César Soler
  2003-07-23 10:50 ` Luciano Miguel Ferreira Rocha
  0 siblings, 1 reply; 2+ messages in thread
From: César Soler @ 2003-07-23  8:46 UTC (permalink / raw)
  To: Lista Linux-admin

Hi,

just a question about changing the mode of a file...
is there any way to know if the mode was changed or just set the same
one? it means, if I changed the mode of two files:

[csoler@gudu csoler]$ ls -ld index*
-rw-rw-r--    1 csoler   csoler      42000 mar 27 10:36 index.html
-rw-------    1 csoler   csoler       9705 jul 22 01:38 index.html.pgp
[csoler@gudu csoler]$ date
mié jul 23 10:39:38 CEST 2003
[csoler@gudu csoler]$ find . -maxdepth 1 -name "index*" -ctime -2 -ls
458789   12 -rw-------   1 csoler   csoler       9705 jul 22 01:38 ./index.html.pgp
[csoler@gudu csoler]$ chmod 664 index.html
[csoler@gudu csoler]$ find . -maxdepth 1 -name "index*" -ctime -2 -ls
458762   44 -rw-rw-r--   1 csoler   csoler      42000 mar 27 10:36 ./index.html
458789   12 -rw-------   1 csoler   csoler       9705 jul 22 01:38 ./index.html.pgp

I would like to know if the mode was changed or not... but I don't know
if this is possible....

any clue will be welcome!
Thanks in advance
-- 
César Soler <csoler@euskalnet.net>		PGP KeyID: 0x179DAD53

Nada dura mas que el cambio.
		-- Bourne. 
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: changing file's mode
  2003-07-23  8:46 changing file's mode César Soler
@ 2003-07-23 10:50 ` Luciano Miguel Ferreira Rocha
  0 siblings, 0 replies; 2+ messages in thread
From: Luciano Miguel Ferreira Rocha @ 2003-07-23 10:50 UTC (permalink / raw)
  To: César Soler; +Cc: Lista Linux-admin


Hi.

Each inode stores three time related information:
atime:  time of last access
mtime:  time of last modification
ctime:  time of last change

ctime referes to changes on the inode, not on file contents (has mtime does),
so it could give you a hint its mode was changed.

There is no other information stored in a file's inode for mode changes.

For more informations about what is available for a inode, see man 2 stat.

The stat(1) utility shows all that information, and you can tell ls to
show other time than mtime using --time=atime or --time=ctime.

Regards,
Luciano Rocha

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-07-23 10:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-23  8:46 changing file's mode César Soler
2003-07-23 10:50 ` Luciano Miguel Ferreira Rocha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).