Solved

directory tim stamp

Posted on 2004-05-02
4
323 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 20 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
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.

737 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