Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

directory tim stamp

Posted on 2004-05-02
4
Medium Priority
?
326 Views
Last Modified: 2013-12-06
under what circumstance, the timestamp of the directory will be changed?
the file inside got delete/modify/create?
thanks!
0
Comment
Question by:jackie190
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 10971918
The timestamp on a directory will change anytime there is a change in the contents of that directory. Obviously, adding/removing files would change the contents, but not so obviously a simple edit of a file will also change the timestamp.
0
 
LVL 21

Accepted Solution

by:
tfewster earned 80 total points
ID: 10972222
Hmm, I disagree that editing an existing file will change the directory timestamp;  The timestamp of the file is held in the files inode. The directory is just a list of inodes and the names associated with those inodes, so I can't see why it would change.

I suppose it could be different for different filesystem types, e.g. if the file grew past a block boundary and the directory referenced the additional blocks/inodes directly.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 10972247
I can't say if it "should" change the timestamp as a result of a simple edit, but my statement was based on a direct test. A simple edit did change the timestamp on the directory.
0
 
LVL 21

Expert Comment

by:tfewster
ID: 10972672
jlevie, I don't doubt your word (and I should have guessed that you would test it to ensure your answer was 100% accurate ;-)   What Unix/Filesystem type did you try it on?  Your setup might be more relevant to jackie190's situation than mine...

I ran some tests on HP-UX 11.0 HFS & VXFS filesystems, plus AIX 4.3 (Veritas based?) and Solaris 8 (I think that machine is all UFS filesystems, but I forgot to check) and a "trivial" edit  such as adding a space or blank line didn't change the directory timestamp.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question