Welcome to MacForumz.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Modification dates of folders are inaccurate

 
Goto page Previous  1, 2, 3
   Macintosh computer (Home) -> General Discussion RSS
Next:  Mail: Attachment goofiness  
Author Message
Mike Rosenberg

External


Since: Oct 28, 2007
Posts: 2719



(Msg. 16) Posted: Wed Feb 20, 2008 5:47 pm
Post subject: Re: Modification dates of folders are inaccurate [Login to view extended thread Info.]
Archived from groups: comp>sys>mac>apps (more info?)

Robert Montgomery <info-block.DeleteThis@stargate_tech.net> wrote:

> Every time I do this to my girlfriend, she demonstrates my point, by
> climaxing.

Yeah, sure she does.

--
<http://designsbymike.net/shop/mac.cgi> Mac and geek T-shirts & gifts
<http://designsbymike.net/shop/musings.cgi> Muckraking T-shirts
<http://designsbymike.net/shop/prius.cgi> Prius shirts/bumper stickers
<http://bogart-tribute.net> Tribute to Humphrey Bogart

 >> Stay informed about: Modification dates of folders are inaccurate 
Back to top
Login to vote
Lewis

External


Since: Jan 19, 2008
Posts: 637



(Msg. 17) Posted: Wed Feb 20, 2008 5:47 pm
Post subject: Re: Modification dates of folders are inaccurate [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

This message is not archived

 >> Stay informed about: Modification dates of folders are inaccurate 
Back to top
Login to vote
Neill Massello1

External


Since: Aug 15, 2003
Posts: 1073



(Msg. 18) Posted: Wed Feb 20, 2008 5:47 pm
Post subject: Re: Modification dates of folders are inaccurate [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Clever Monkey <spamtrap.RemoveThis@clevermonkey.org.INVALID> wrote:

> Seriously, who brings something like this up in c.s.m.a?

A troll, specifically one whose trollishness does not appear in the
original post but only later on in the ever more outlandish and
provocative responses he makes just to keep the thread going.
 >> Stay informed about: Modification dates of folders are inaccurate 
Back to top
Login to vote
Clever Monkey

External


Since: Apr 26, 2007
Posts: 251



(Msg. 19) Posted: Wed Feb 20, 2008 6:03 pm
Post subject: Re: Modification dates of folders are inaccurate [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Tom Stiller wrote:
> In article <1icmbmg.1mh4ayw1tuqyhqN%mikePOST@TOGROUPmacconsult.com>,
> mikePOST RemoveThis @TOGROUPmacconsult.com (Mike Rosenberg) wrote:
>
>> Lewis <gkreme RemoveThis @gmail.com> wrote:
>>
>>> that's not what the date moidified on the folder means.
>> Moidified, eh? I'll moidify YOU! (Sorry, but something about that
>> three me into Three Stooges mode.)
>
> Three of you? I'll give you three of you!
>
Oh, wise guys, eh? I'll learn you!
 >> Stay informed about: Modification dates of folders are inaccurate 
Back to top
Login to vote
Robert Montgomery

External


Since: Feb 20, 2007
Posts: 185



(Msg. 20) Posted: Wed Feb 20, 2008 6:28 pm
Post subject: Re: Modification dates of folders are inaccurate [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

nospam wrote:
> In article <cJZuj.42850$C61.43@edtnps89>, Robert Montgomery
> <info-block.TakeThisOut@stargate_tech.net> wrote:
>
>> If you put a sheet of paper into a file folder, or take the sheet of
>> paper out of the file folder, the contents of the file folder certainly
>> changes.
>
> and if you move a file into or out of a folder, the modification date
> will change, as expected.
>
> the key is that you are *not* modifying the contents of the folder, but
> instead, modifying something contained within the folder. the date on
> *that* file changes, but since the number of items in the parent folder
> remains the same, its modification date does not change.
>
> it's exactly as it should be.

Okay, I think I get it.

But I think it would be more accurate to say that the contents of the
folder IS modified when you "Save As" a file in its folder, but "Date
Modified" ingores that information; Date Modified changes only when the
number of files in the folder changes

Therefore, "Date Modified" gives only a partial report on folder content
changes.
 >> Stay informed about: Modification dates of folders are inaccurate 
Back to top
Login to vote
Clever Monkey

External


Since: Apr 26, 2007
Posts: 251



(Msg. 21) Posted: Wed Feb 20, 2008 6:28 pm
Post subject: Re: Modification dates of folders are inaccurate [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Robert Montgomery wrote:
> nospam wrote:
>> In article <cJZuj.42850$C61.43@edtnps89>, Robert Montgomery
>> <info-block RemoveThis @stargate_tech.net> wrote:
>>
>>> If you put a sheet of paper into a file folder, or take the sheet of
>>> paper out of the file folder, the contents of the file folder
>>> certainly changes.
>>
>> and if you move a file into or out of a folder, the modification date
>> will change, as expected.
>> the key is that you are *not* modifying the contents of the folder, but
>> instead, modifying something contained within the folder. the date on
>> *that* file changes, but since the number of items in the parent folder
>> remains the same, its modification date does not change.
>> it's exactly as it should be.
>
> Okay, I think I get it.
>
> But I think it would be more accurate to say that the contents of the
> folder IS modified when you "Save As" a file in its folder, but "Date
> Modified" ingores that information; Date Modified changes only when the
> number of files in the folder changes
>
Regardless of whether you did "save as", did the file you are saving
already exist in the directory?
--
clvrmnky <mailto:spamtrap@clevermonkey.org>

Direct replies to this address will be blacklisted. Replace "spamtrap"
with my name to contact me directly.
 >> Stay informed about: Modification dates of folders are inaccurate 
Back to top
Login to vote
Barry Margolin

External


Since: Feb 18, 2004
Posts: 1406



(Msg. 22) Posted: Wed Feb 20, 2008 9:48 pm
Post subject: Re: Modification dates of folders are inaccurate [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <1j_uj.43211$C61.41687@edtnps89>,
Robert Montgomery <info-block DeleteThis @stargate_tech.net> wrote:

> nospam wrote:
> > In article <cJZuj.42850$C61.43@edtnps89>, Robert Montgomery
> > <info-block DeleteThis @stargate_tech.net> wrote:
> >
> >> If you put a sheet of paper into a file folder, or take the sheet of
> >> paper out of the file folder, the contents of the file folder certainly
> >> changes.
> >
> > and if you move a file into or out of a folder, the modification date
> > will change, as expected.
> >
> > the key is that you are *not* modifying the contents of the folder, but
> > instead, modifying something contained within the folder. the date on
> > *that* file changes, but since the number of items in the parent folder
> > remains the same, its modification date does not change.
> >
> > it's exactly as it should be.
>
> Okay, I think I get it.
>
> But I think it would be more accurate to say that the contents of the
> folder IS modified when you "Save As" a file in its folder, but "Date
> Modified" ingores that information; Date Modified changes only when the
> number of files in the folder changes
>
> Therefore, "Date Modified" gives only a partial report on folder content
> changes.

A folder is basically just a list of filenames. If that information
doesn't change, the folder isn't modified.

Overwriting an existing file doesn't modify the folder itself. Adding
and removing files does. So does renaming files, because the list of
filenames is different.

Here's an analogy. Suppose you have a piece of paper with a list of
bank account numbers and ATM PINs. Depositing or withdrawing money in
the bank accounts doesn't modify your account list -- you don't have to
write on that piece of paper. But if you cancel an account, you should
erase it from the paper.

--
Barry Margolin, barmar DeleteThis @alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
 >> Stay informed about: Modification dates of folders are inaccurate 
Back to top
Login to vote
user638

External


Since: Jan 13, 2005
Posts: 926



(Msg. 23) Posted: Thu Feb 21, 2008 2:27 am
Post subject: Re: Modification dates of folders are inaccurate [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <cJZuj.42850$C61.43@edtnps89>,
Robert Montgomery <info-block.TakeThisOut@stargate_tech.net> wrote:

> Tom Stiller wrote:
> > In article <s5Yuj.42797$C61.13400@edtnps89>,
> > Robert Montgomery <info-block.TakeThisOut@stargate_tech.net> wrote:
> >
> >> The folders on my Imac have the same "Date Modified" as the
> >> corresponding, duplicated folders on my external drives.
> >>
> >> But when I examine the contents of the folders on both the Imac and the
> >> external drives, some of the contents of some of the folders on my Imac
> >> have more recent modification dates than the corresponding contents of
> >> the corresponding folders on my external drives.
> >>
> >> How can I get the folders on my Imac to accurately show the modification
> >> dates of the contents of those folders?
> >>
> >
> > Change the content of the folders. Changing the content of a file
> > within a folder doesn't change the folder's content.
>
> I don't understand. This sounds like a paradox.
>
> If you put a sheet of paper into a file folder, or take the sheet of
> paper out of the file folder, the contents of the file folder certainly
> changes.
>
> How could it be ­ or why WOULD it be ­ any different on a computer?

Actually, the first thing that should be asked is what is your
ultimate goal. Maybe there is another way to solution to your
problem that does not depend on directory modification dates.

Now for some clarification on how directories work.

The the directory is structurally similar to an address book.

That is to say a directory contains a name and an internal file
system specific address for the file (called the inode number).

The file does not physically exist within the directory. So the
real world analogy of putting a sheet of paper in a folder is not
really how it works internally. Internally you just put the name
you call the paper in the directory, and the file system records
the internal address of where it really put the paper.

In addition, the file does not know its parent directory. I'll
elaborate on this in a moment. But because the file does not know
its parent directory it can not tell the file system what
directory modification date to update.

The file system allows the use of hard links. Hard links allow
the file system to have multiple directories that point the the
exact same file (using the same or a different name). That is to
say, multiple address books can hold the address of the same
person, using names such as Mr Smith in one, "My Friend Fred" in
another, or "Tech Support Dude", etc.... Each new hard link
increments a reference count on the file so that the file system
knows not to really delete the file until that last hard link is
removed from the last directory.

This hard link feature is extremely useful for things like Time
Machine backups in Leopard. And if you have been saved by Time
Machine, then hard links are something you will grow to love even
if you didn't know they existed.

Because multiple directories can point to the same file, updating
the date of the parent directory becomes much more complicated,
because even if the file system had saved the path used to open
the file when it was modified, it would not know the path to all
the other directories which hard links to the file.

Now your assuming that looking at the parent directory is the way
to decide to backup the contents of a directory. There are other
ways, such as hooking into the file systems event notification
system and allowing the file system to tell a backup daemon when a
file has changed. The backup daemon can then do whatever it wants
with this information: save the list for the next backup, backup
right away, other... There are lots of existing backup utilities
that can be used to incrementally backup a file system besides
Time Machine. And if you want to work at the Unix level, then
there are lots of Unix commands that can aid in finding files to
be backed up (such as rsync).

Mac OS X does support multiple file systems for data disks, so
maybe you want to explore one of the other file systems such as
FAT, UnixFS, ZFS. And there is a project called MacFUSE that
allows even more file systems to be used on Mac OS X.

And of course you can write your own file system for Mac OS X and
have it do whatever you want. Then again, my day job is as a file
system developer, and getting those file system details just right
is a full time job for my entire group of 2 dozen developers :-)

Bob Harris
 >> Stay informed about: Modification dates of folders are inaccurate 
Back to top
Login to vote
Mark Conrad

External


Since: Jan 31, 2007
Posts: 524



(Msg. 24) Posted: Thu Feb 21, 2008 4:55 am
Post subject: Re: Modification dates of folders are inaccurate [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <IhZuj.42829$C61.33621@edtnps89>,
Robert Montgomery <info-block DeleteThis @stargate_tech.net> wrote:

> When I look at the Date Modified of a folder, I want
> to know when the contents of folder were last updated.

I can sympathize with your viewpoint.

When Apple used the concept of "folders", they explained
the concept with an analogy to real folders in everyday
experience, which is what mislead you (and me) because
of the fact that analogies themselves are often misleading.


analogy-
a correspondence or partial similarity


Explaining how computers work is fraught with difficulty,
so analogies are used in an attempt to convey some sort
of understanding.

Using analogies works, kinda, but there is always the
danger that the analogy will lead to confusion, because
of the fact that an analogy is only _partially_ correct.


For example, to this day hard drive manufacturers advertise
their hard drive capacities as being what "ordinary" people
expect. They do this for marketing purposes, in order to
make their hard drives look as big as possible, when it
comes to storage capacity.

Namely, a 200 GB drive will supposedly hold 200 GB of data.

It will not, which is a source of confusion to any new
computer user who is not familiar with how the terms
kilobyte, megabyte, gigabyte were bastardized by
computer programmers in the early days of computers.

This corruption of the original meaning of the prefixes
kilo, mega, and giga is even accepted nowadays in modern
dictionaries, such as the built in dictionary of OS X,
but only when referring to computers.

In other lines of human endeavor, the original meaning of
those prefixes is retained:

kilo = 1,000
mega = 1,000,000
giga = 1,000,000,000





Computer programmers and users are the exception:

kilobyte = 1024 bytes
megabyte = 1,048,576 bytes
gigabyte = 1,073,741,824 bytes



Periodically, a new computer user will post a lament that
his brand new 200 GB hard drive will not hold 200 GB of data,
in fact it appears he was "shorted" by about 14 MBs.

It has to be laboriously explained to him why this happened,
in a thread somewhat like this thread.



Just accept that computer users, and especially computer
programmers, are weird people.

They attach their own meanings to established words.



FWIW, doctors are even worse about butchering language.
(makes for job security, y'know)

Mark-
 >> Stay informed about: Modification dates of folders are inaccurate 
Back to top
Login to vote
Mark Conrad

External


Since: Jan 31, 2007
Posts: 524



(Msg. 25) Posted: Thu Feb 21, 2008 7:13 am
Post subject: Re: Modification dates of folders are inaccurate [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article
<noneof-8693CE.04551721022008.RemoveThis@earthlink.vsrv-sjc.supernews.net>,
Mark Conrad <noneof.RemoveThis@urbusiness.invalid> wrote:

> Periodically, a new computer user will post a lament that
> his brand new 200 GB hard drive will not hold 200 GB of data,
> in fact it appears he was "shorted" by about 14 MBs.

Whoops, typo in my post, that should be:

"...in fact it appears he was 'shorted' by about 14 GBs."


Sorry 'bout dat.

Mark-
 >> Stay informed about: Modification dates of folders are inaccurate 
Back to top
Login to vote
dorayme

External


Since: Feb 21, 2006
Posts: 1329



(Msg. 26) Posted: Thu Feb 21, 2008 7:47 am
Post subject: Re: Modification dates of folders are inaccurate [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article
<tomstiller-720DF2.17031020022008.TakeThisOut@newsgroups.comcast.net>,
Tom Stiller <tomstiller.TakeThisOut@comcast.net> wrote:

> In article <1icmbmg.1mh4ayw1tuqyhqN%mikePOST@TOGROUPmacconsult.com>,
> mikePOST.TakeThisOut@TOGROUPmacconsult.com (Mike Rosenberg) wrote:
>
> > Lewis <gkreme.TakeThisOut@gmail.com> wrote:
> >
> > > that's not what the date moidified on the folder means.
> >
> > Moidified, eh? I'll moidify YOU! (Sorry, but something about that
> > three me into Three Stooges mode.)
>
> Three of you? I'll give you three of you!

You three are through.

--
dorayme
 >> Stay informed about: Modification dates of folders are inaccurate 
Back to top
Login to vote
John Varela

External


Since: Dec 04, 2007
Posts: 88



(Msg. 27) Posted: Thu Feb 21, 2008 9:38 pm
Post subject: Re: Modification dates of folders are inaccurate [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Thu, 21 Feb 2008 07:55:17 -0500, Mark Conrad wrote
(in article <noneof-8693CE.04551721022008 DeleteThis @earthlink.vsrv-sjc.supernews.net>):

> When Apple used the concept of "folders", they explained the concept with an
> analogy to real folders in everyday experience, which is what mislead you
> (and me) because of the fact that analogies themselves are often misleading.

In engineering, if two processes are analogues, then they obey the same
equations after substitution of variables and coefficients. So I would call
it a metaphor rather than an analogy, since analogy implies a stronger
parallelism.

It would have been clearer to retain the old term, directory. A directory is
just a list of objects and their locations, and the directory itself doesn't
change unless something is added to or removed from the list[1]. But if you
call it a folder, then one thinks about is like a physical folder, and if a
document in a physical folder is replaced with a newer version, then I agree
that the contents of that folder have changed, so the metaphor is misleading.

[1] Yes, yes, I know that the pointers and extents change when files are
updated, but give me some slack here.

--
John Varela
Trade NEW lamps for OLD for email.
 >> Stay informed about: Modification dates of folders are inaccurate 
Back to top
Login to vote
Mark Conrad

External


Since: Jan 31, 2007
Posts: 524



(Msg. 28) Posted: Thu Feb 21, 2008 9:38 pm
Post subject: Re: Modification dates of folders are inaccurate [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <0001HW.C3E38EFE00262C6BB01AD9AF.RemoveThis@news.verizon.net>,
John Varela <OLDlamps.RemoveThis@verizon.net> wrote:

> It would have been clearer to retain the old term, directory.

I agree.

Probably the reason that Apple choose to use the concept
of folders is because folders were more familiar to
ordinary users.

I admire Apple's continuing efforts to keep things simple
and easy to understand.

Mark-
 >> Stay informed about: Modification dates of folders are inaccurate 
Back to top
Login to vote
Jeff Wiseman

External


Since: Jun 29, 2005
Posts: 79



(Msg. 29) Posted: Thu Feb 21, 2008 11:03 pm
Post subject: Re: Modification dates of folders are inaccurate [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Robert Montgomery wrote:

> The folders on my Imac have the same "Date Modified" as the
> corresponding, duplicated folders on my external drives.
>
> But when I examine the contents of the folders on both the Imac and the
> external drives, some of the contents of some of the folders on my Imac
> have more recent modification dates than the corresponding contents of
> the corresponding folders on my external drives.
>
> How can I get the folders on my Imac to accurately show the modification
> dates of the contents of those folders?


As has been pointed out, you can't really without writing your
own OS extension to roll this information up.

The folder analogy doesn't quite hold true for the way the "FILE"
system works--especially with the UNIX underpinnings of the Mac.

Understanding this concept is critical to understanding how
access priviledges work.

In Unix, almost everything in the file system is a FILE (i.e. a
cohesively defined collection of data on the disk). A file has a
name, type, contents, and access rights. This is very simple and
EVERYTHING is based on this same structure and concept.

A text file contains ascii text. An executable file contains
binary code.

A directory file (i.e., your "folder") is just a file like any
other but being a directory file, it contains the names, and
location pointers to the other files which are "in" the directory
(which could be text files, executable files or other directory
files). It does NOT contain the actual files or their contents.
It only contains the names and locations of the files--i.e., it
is a DIRECTORY (and was called that many years before Apple
called it a "folder").

E.g., If someone tells you that they are "in the phonebook"
(i.e., "in the phone directory"), it doesn't really MEAN that you
can open the book and they will crawl out of it. It means that
they are identified there (by name) with a pointer (their phone
number and address) so that you can find them.

A file that is "in" a directory simply has its name and location
identifiers stored in a special file somewhere called a directory
file. If a text file is modified, it's time/date stamp (which is
contained in that file) is updated. If a directory file is
modified, the same will happen. However, since the ONLY things
stored in a directory file are the file names and pointers,
changing the contents of one of those identified files does not
do anything at all to the contents of the directory file itself,
therefor, its time stamp remains unchanged.

E.g., If I tear out all of the walls in my home and remodel it,
the phone company has no need to update their directory for my
address and phone number since nothing in the directory has
anything to do with the layout of my home--it only exists so that
people can find my home or contact me.

When Apple chose to use the UNIX type of file system, they had to
map the concept of the folder (a container of containers) to the
directory (a container of pointers to other containers).

BTW, the way you DELETE a file is to MODIFY the DIRECTORY that
points to it--i.e., delete the name and pointer in the directory.
The file then floats away to oblivion, eventually being
overwritten by other files using that space (which the file
system now does not recognize since it is not associated with a
directory file anywhere). Even if I have a telephone, if the
phone company removes me from their directory, for all intents
and purposes I no longer exist to telemarketers ("I" have been
deleted).

Now, what is important here is that you recognize that the access
permissions follow these same uniform rules. If you write protect
a directory (Folder), no one can erase files that you have in it
or move their on screen locations around. BUT, if any of those
files have their own write access, someone can edit the file and
delete all of its contents, leaving an empty file that still
exists in the directory. This is why when you do a Get Info on a
folder and change the access rights, you are given a button
option where you can apply those same access rights of the folder
to the items contained inside the folder as well instead of
having to go through and do it one file at a time.

The converse also applies. If you write protect your thesis
document, you can prevent anyone from altering it, but if there
is world write access to the directory file that identifies it,
then anyone in the world can delete it.

In summary, a folder is not a bucket that you put things in, it
is a directory where you list their locations.

Hope this helps some.


--
Jeff Wiseman
to reply, just remove ALLTHESPAM
 >> Stay informed about: Modification dates of folders are inaccurate 
Back to top
Login to vote
John Varela

External


Since: Dec 04, 2007
Posts: 88



(Msg. 30) Posted: Fri Feb 22, 2008 3:55 pm
Post subject: Re: Modification dates of folders are inaccurate [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Thu, 21 Feb 2008 22:10:23 -0500, AV3 wrote
(in article <fplef0$q34$1@aioe.org>):

> It's a metaphor, but "directory" is a poor one except for the relative few
> with special knowledge of old computer jargon. Apple is thinking about the
> sort of person who associates the word "directory" with a phone book.

I don't know if the phone book was the inspiration for the computer usage of
"directory", but it's a better metaphor than "folder" is. A phone directory
is a list of people and where to reach them; a disk directory is a list of
files and where to find them.

--
John Varela
Trade NEW lamps for OLD for email.
 >> Stay informed about: Modification dates of folders are inaccurate 
Back to top
Login to vote
Display posts from previous:   
   Macintosh computer (Home) -> General Discussion All times are: Pacific Time (US & Canada) (change)
Goto page Previous  1, 2, 3
Page 2 of 3

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]