equivalent to utime


 
Thread Tools Search this Thread
Top Forums Programming equivalent to utime
# 1  
Old 11-15-2006
equivalent to utime

Hi,

Is there any system call which changes the time of symbolic link apart from utime? or if tere is no system call any other option of how to do it?

Thanks
# 2  
Old 11-15-2006
Depending on the OS, there is utime() and utimes(), sometimes both - like Linux.

You can also use the touch utility from the command line to change filetimes.
# 3  
Old 11-15-2006
The problem, if it is a problem, is that utime()/utimes() will affect the target of the symlink, not the symlink itself. A very few Unix versions also have lutimes(). For example:
http://leaf.dragonflybsd.org/cgi/web...imes&section=2
# 4  
Old 11-15-2006
The OS I am using does not have lutime. And utime changes the target of the symbolic link. So I need a different option in my program to change the time of the symbolic link itself.
# 5  
Old 11-16-2006
Why do you need this capability? The only easy thing I can think of is to remove and recreate the symlink. This probably will set the time fields to NOW. And then the only way to backdate is to set the system clock to the desired time during the remove/recreate.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

utime returning -1 BAD File DEscriptor

Hi All, First of all thanks for reading this post. In my application, I am trying to create a new message queue . I am attaching the code below. mqd_t mqopen2(const char * pName, unsigned long Flags, long maxMsg, long msgSz) {... (15 Replies)
Discussion started by: parusasi
15 Replies

2. Shell Programming and Scripting

need perl equivalent

Dear All, Good day, can any of you help me in the following problem: I need to find the perl equivalent for the following commandline grep characters |awk '{print \$2}'Expecting your reply and thanks in advance. Warm regards Fredrick. (4 Replies)
Discussion started by: Fredrick
4 Replies

3. Linux

Linux equivalent for...

I moved to a Linux system from Windows a few months ago. Most of the programs I had been using were already native to Linux (Firefox, the GIMP, Pari, etc.) and most others I found a close enough program (Crimson Editor -> gedit, Visual Studio -> KDevelop, Primo -> Morain's ECPP). Now I'm down... (1 Reply)
Discussion started by: CRGreathouse
1 Replies

4. UNIX for Dummies Questions & Answers

Zgrep equivalent-

Hi guys I cant use zgrep on a SunOS Do you know any alternative for it? i need to use zgrep -c grep works fine but zgrep is not supported (4 Replies)
Discussion started by: khestoi
4 Replies

5. HP-UX

lsof equivalent in HP-UX

I need lsof equivalent in HP-UX. I do not want to add lsof utility separately. (1 Reply)
Discussion started by: deo_kaustubh
1 Replies

6. HP-UX

pwdx equivalent on HP

In sun solaris, pwdx will give the print working directory. Suppose I have 5 databases running on different oracle versions. If I want to know what database is running on what oracle version, I just give pwdx <process id>. It will show the oracle home details. Could you give me the... (10 Replies)
Discussion started by: oracleuser
10 Replies

7. Shell Programming and Scripting

ps ax equivalent in solaris

I am using "ps ax" command in one of my scripts . AIX has x flag for ps . is there any equilent command for ps ax in solaris ? Thanks (1 Reply)
Discussion started by: talashil
1 Replies

8. HP-UX

hp-ux mksysb equivalent

Hi Guys, Does hp-ux has mksysb equivalent with aix? Or something similar that you can save the system config. Or you just backup the boot image, that's it. Thanks in advance, itik (3 Replies)
Discussion started by: itik
3 Replies

9. Shell Programming and Scripting

Cannot utime: Operation not permitted

Hi - I have a script (.ksh) which has been transferred from one Linux box to another. Basically it untars a file a deploys the code to the relevent directories. It is failing with ' Cannot utime: Operation not permitted' When I run the command by hand it *is* doing the untar to the directories... (1 Reply)
Discussion started by: ajcannon
1 Replies

10. Shell Programming and Scripting

Utime Command

Hello ! Do you have any example of the utime command ? I'm trying to change the time of last change of a file to a defined time. Thanks. (3 Replies)
Discussion started by: margue
3 Replies
Login or Register to Ask a Question