Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: why does open ">..." sometimes touches the directory?

by flexvault (Monsignor)
on Feb 05, 2013 at 09:27 UTC ( #1017089=note: print w/replies, xml ) Need Help??


in reply to why does open ">..." sometimes touches the directory?

Hello Mark_Galeck,

Since you're on Linux, what you are seeing is "normal". Occasionally I get interrupted and forget where I put a file, I can go to the head of the file system and follow the updated directories to locate the file. ( Hint: all directories are 'touch'ed, and on a very active system this technique may not work. ) When installing your *nix, you can turn this feature off to get better performance. Usually flash drives and Live CD/DVDs are build this way.

If you have administrative rights you can use the 'ln -s' command to bypass how you access the file, for example:

/home/mark/bin/myscript ## This file exists ln -s /home/mark/bin /mark ## /mark is symbolic link to /home +/mark/bin touch /mark/myscript ## change timestamp on directories + to myscript

The actual directories to 'myscript' will have their timestamps updated, but the symbolic link '/mark' will not change. ( If that is what you want ).

However as a system admin, I would be very concerned about 'end users' not wanting to show that they added/updated a file.

Good Luck...Ed

Update: This tested correctly on AIX, but after reading dave_the_m comments, I tried it on a "debian" and a "suse" systems with mixed results.

"Well done is better than well said." - Benjamin Franklin

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1017089]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2016-12-11 00:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (168 votes). Check out past polls.