Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #123213

Re: [sot] file times / file metadata

From "Pascal J. Bourguignon" <pjb@informatimago.com>
Newsgroups comp.lang.c
Subject Re: [sot] file times / file metadata
Date 2017-11-21 22:04 +0100
Organization Informatimago
Message-ID <m23757e43g.fsf@informatimago.com> (permalink)
References <5a91718b-b272-4cdf-adfd-8f6777851b23@googlegroups.com> <m2bmjve6tv.fsf@informatimago.com> <d345c604-951c-4f3b-b189-7b41bad1d8e0@googlegroups.com> <eae94c1a-9e49-409a-8cfa-3683ce05082a@googlegroups.com>

Show all headers | View raw


fir <profesor.fir@gmail.com> writes:

> note yet i made some test that was
> copyying file in total comender and the result is a bit discussable
>
>
> - when i copied file the old one file changed acces time to current 
> (though i was not opening it only copying) 

Think about it!

How would YOU copy the file if not by opening it and reading it?

(There is  an answer, and once  you find it, you'll  understand why it's
not provided, and why you have to open the file and read it to copy it).



> - the new file acces time also modified to current (though i not opened it too)


See above.
Access time includes both reading and writing.
Modification time only writing.


> - the new file creation time was changed to current
>
> - the new file modify time stays old
> (this way creation gets newer than modify)

Yes. This is how you know it's a copy.


> well maybe tis is ok, not sure but may be a little confusing
>
> btw total commander and windows xp show by default this modify time
> (yet one test renaming seem not change modify time) maybe this is ok
> (when looking for example on source files etc) though it seem to me
> that turning it to acces (read) time my give more information whats
> going on in the system
>
> those two dates creation and modify may be (and are)  confusing imo,
> it would be maybe a bit better only to primarely use 2 times: acces time (it is read time) and modify time (it is writeinto time )
>
> creation time is confucing esp if this behave the way i wrote - not
> preserves oryginal first copy creation time but just become in fact
> copy-time (do copy time may be usefull? more than oryginal creation?
> (both probably not much usefull - well at least im happy i understood
> it a bit as i never yet get attempt to try understood it))


Again, if you want more reliable logs, you will have to use the
blockchain.  You can also write logs in a database or log file, when
high level operations made of the files are executed, but those
databases or log files could themselves be modified, so you wouldn't
gain anything.  You need a write-only device such as provided by the
blockchain (or a printer).

Said otherwise, OS file systems are not document management systems.
They try to provide efficient use of hardware resources, not political
control of access to the documents.

They don't control the access rights and don't log the operations made
on files, in the same manner as you can see in Hollywood movies.  Nobody
receives a message on his terminal when you open, copy or delete a file
thru the file system!

But the system provides the tools to implement such a Hollywoodesque
control system.  For example, there's inotify(7).
https://linux.die.net/man/7/inotify
You can implement a user mode file system (eg. with FUSE
https://www.ibm.com/developerworks/library/l-fuse/ ).

There are document management systems that will manage the storage and
security of your document, with logs of the whole history of the document.
https://en.wikipedia.org/wiki/Document_management_system

etc
-- 
__Pascal J. Bourguignon
http://www.informatimago.com

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

[sot] file times / file metadata fir <profesor.fir@gmail.com> - 2017-11-21 11:50 -0800
  Re: [sot] file times / file metadata "Pascal J. Bourguignon" <pjb@informatimago.com> - 2017-11-21 21:05 +0100
    Re: [sot] file times / file metadata Ian Collins <ian-news@hotmail.com> - 2017-11-22 09:15 +1300
    Re: [sot] file times / file metadata fir <profesor.fir@gmail.com> - 2017-11-21 12:23 -0800
      Re: [sot] file times / file metadata fir <profesor.fir@gmail.com> - 2017-11-21 12:42 -0800
        Re: [sot] file times / file metadata fir <profesor.fir@gmail.com> - 2017-11-21 13:01 -0800
        Re: [sot] file times / file metadata "Pascal J. Bourguignon" <pjb@informatimago.com> - 2017-11-21 22:04 +0100
          Re: [sot] file times / file metadata fir <profesor.fir@gmail.com> - 2017-11-21 13:17 -0800
          Re: [sot] file times / file metadata fir <profesor.fir@gmail.com> - 2017-11-21 13:22 -0800
            Re: [sot] file times / file metadata "Pascal J. Bourguignon" <pjb@informatimago.com> - 2017-11-21 23:23 +0100
              Re: [sot] file times / file metadata Ian Collins <ian-news@hotmail.com> - 2017-11-22 11:34 +1300
              Re: [sot] file times / file metadata Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2017-11-21 17:34 -0500
              Re: [sot] file times / file metadata fir <profesor.fir@gmail.com> - 2017-11-21 16:16 -0800
                Re: [sot] file times / file metadata "Pascal J. Bourguignon" <pjb@informatimago.com> - 2017-11-22 01:44 +0100
                Re: [sot] file times / file metadata Ian Collins <ian-news@hotmail.com> - 2017-11-22 14:10 +1300
                Re: [sot] file times / file metadata gordonb.eiy78@burditt.org (Gordon Burditt) - 2017-11-28 01:55 -0600
          Re: [sot] file times / file metadata David Brown <david.brown@hesbynett.no> - 2017-11-22 11:07 +0100
            Re: [sot] file times / file metadata Jerry Stuckle <jstucklex@attglobal.net> - 2017-11-22 09:13 -0500
              Re: [sot] file times / file metadata David Brown <david.brown@hesbynett.no> - 2017-11-22 15:50 +0100
                Re: [sot] file times / file metadata jameskuyper@verizon.net - 2017-11-22 07:08 -0800
                Re: [sot] file times / file metadata David Brown <david.brown@hesbynett.no> - 2017-11-22 16:22 +0100
                Re: [sot] file times / file metadata bartc <bc@freeuk.com> - 2017-11-22 15:37 +0000
                Re: [sot] file times / file metadata bartc <bc@freeuk.com> - 2017-11-22 15:43 +0000
                Re: [sot] file times / file metadata Jerry Stuckle <jstucklex@attglobal.net> - 2017-11-22 15:01 -0500
                Re: [sot] file times / file metadata Ian Collins <ian-news@hotmail.com> - 2017-11-23 17:52 +1300
                Re: [sot] file times / file metadata Jerry Stuckle <jstucklex@attglobal.net> - 2017-11-23 14:12 -0500
                Re: [sot] file times / file metadata Ian Collins <ian-news@hotmail.com> - 2017-11-24 08:28 +1300
                Re: [sot] file times / file metadata Jerry Stuckle <jstucklex@attglobal.net> - 2017-11-24 08:52 -0500
                Re: [sot] file times / file metadata David Brown <david.brown@hesbynett.no> - 2017-11-23 09:39 +0100
                Re: [sot] file times / file metadata Jerry Stuckle <jstucklex@attglobal.net> - 2017-11-23 14:17 -0500
                Re: [sot] file times / file metadata cross@spitfire.i.gajendra.net (Dan Cross) - 2017-11-28 16:44 +0000
                Re: [sot] file times / file metadata Jerry Stuckle <jstucklex@attglobal.net> - 2017-11-28 14:23 -0500
                Re: [sot] file times / file metadata cross@spitfire.i.gajendra.net (Dan Cross) - 2017-11-28 19:35 +0000
                Re: [sot] file times / file metadata Jerry Stuckle <jstucklex@attglobal.net> - 2017-11-30 15:54 -0500
                Re: [sot] file times / file metadata cross@spitfire.i.gajendra.net (Dan Cross) - 2017-11-30 21:43 +0000
                Re: [sot] file times / file metadata scott@slp53.sl.home (Scott Lurndal) - 2017-11-28 19:42 +0000
                Re: [sot] file times / file metadata cross@spitfire.i.gajendra.net (Dan Cross) - 2017-11-28 20:13 +0000
                Re: [sot] file times / file metadata Jerry Stuckle <jstucklex@attglobal.net> - 2017-11-30 15:57 -0500
                Re: [sot] file times / file metadata scott@slp53.sl.home (Scott Lurndal) - 2017-11-30 21:17 +0000
                Re: [sot] file times / file metadata jameskuyper@verizon.net - 2017-11-28 09:35 -0800
                Re: [sot] file times / file metadata Ian Collins <ian-news@hotmail.com> - 2017-11-29 08:24 +1300
                Re: [sot] file times / file metadata Ian Collins <ian-news@hotmail.com> - 2017-11-29 08:27 +1300
                Re: [sot] file times / file metadata Jerry Stuckle <jstucklex@attglobal.net> - 2017-11-28 14:29 -0500
                Re: [sot] file times / file metadata David Brown <david.brown@hesbynett.no> - 2017-11-29 09:51 +0100
                Re: [sot] file times / file metadata Jerry Stuckle <jstucklex@attglobal.net> - 2017-11-30 15:59 -0500
                Re: [sot] file times / file metadata David Brown <david.brown@hesbynett.no> - 2017-11-29 10:00 +0100
                Re: [sot] file times / file metadata "James R. Kuyper" <jameskuyper@verizon.net> - 2017-11-29 09:11 -0500
                Re: [sot] file times / file metadata David Brown <david.brown@hesbynett.no> - 2017-11-29 15:28 +0100
                Re: [sot] file times / file metadata "James R. Kuyper" <jameskuyper@verizon.net> - 2017-11-29 11:32 -0500
                Re: [sot] file times / file metadata James Kuyper <jameskuyper@verizon.net> - 2017-11-23 15:05 -0500
                Re: [sot] file times / file metadata David Brown <david.brown@hesbynett.no> - 2017-11-24 10:20 +0100
                Re: [sot] file times / file metadata Jerry Stuckle <jstucklex@attglobal.net> - 2017-11-24 09:05 -0500
                Re: [sot] file times / file metadata Robert Wessel <robertwessel2@yahoo.com> - 2017-11-24 22:50 -0600
                Re: [sot] file times / file metadata cross@spitfire.i.gajendra.net (Dan Cross) - 2017-11-28 16:59 +0000
                Re: [sot] file times / file metadata Ian Collins <ian-news@hotmail.com> - 2017-11-29 08:26 +1300
                Re: [sot] file times / file metadata David Brown <david.brown@hesbynett.no> - 2017-11-29 10:10 +0100
                Re: [sot] file times / file metadata cross@spitfire.i.gajendra.net (Dan Cross) - 2017-11-29 21:01 +0000
                Re: [sot] file times / file metadata David Brown <david.brown@hesbynett.no> - 2017-11-29 23:13 +0100
                Re: [sot] file times / file metadata cross@spitfire.i.gajendra.net (Dan Cross) - 2017-11-30 17:26 +0000
              Re: [sot] file times / file metadata fir <profesor.fir@gmail.com> - 2017-11-22 08:00 -0800
              Re: [sot] file times / file metadata "Pascal J. Bourguignon" <pjb@informatimago.com> - 2017-11-22 17:11 +0100
            Re: [sot] file times / file metadata "Pascal J. Bourguignon" <pjb@informatimago.com> - 2017-11-22 16:51 +0100
              Re: [sot] file times / file metadata scott@slp53.sl.home (Scott Lurndal) - 2017-11-22 16:36 +0000

csiph-web