DISQUS

DISQUS Hello! Tech-Recipes is using DISQUS, a powerful comment system, to manage its comments. Learn more.

Community Page

Tech-Recipes

Cookbook of Tech Tutorials
Jump to original thread »
Author

Create/modify a UNIX file with an arbitrary timestamp | Solaris system administration | Tech-Recipes

Started by qdideas · 9 months ago

No excerpt available. Jump to website »

4 comments

  • How do you handle symbolic links? The touch command affects the target of the symbolic link and not the link itself.
  • Good question. I've never noticed this behavior before. I don't see any options for touch that would make it not follow the link. If you really need the link to be updated by a touch and it is in the same filesystem as the real file, you could use a hard link. When you touch a hard link, it updates both the link and the original file. The hard link doesn't look like a symbolic link, it just looks like a regular file, which may not be desirable. That's the only suggestion that I have. Anyone else?

    Quinn
  • Excellent..... now.....

    Who to stamp the timeref file with a date like 15 days ago ?
  • touch -B <#> will set the timestamp to a date in the past by the number of seconds provided

    ie. touch -B 10 will make the file appear 10 seconds older than the current date.

    man touch is more helpful than waiting a few months for an answer :)

Add New Comment

Returning? Login