Sounds like someone is trying to do something fishy "file should appear as if it has not been modified" . Anyways, I have a question about the modification time for a symbolic link.
the timestamp on apps/gendev/src/foo.c is say 'May 27 11:37'
the timestamp on foo.c (which points to the source file) is 'May 27 10:42' which is when the link was created. Everytime I edit foo.c from my directory the timestamp on apps/gendev/src/foo.c is updated which I understand because I am really modifying that file. I want to know if there is a way to modify the timestamp on the link without relinking the file?
Thanks
Last edited by rbatte1; 08-09-2016 at 05:07 AM..
Reason: Added CODE tags
Hi!! Experts,
Is there any way to find the timestamp when the permission of a file was modified?? I mean no change to file contents.. Just the chnage of permissions.
:) (1 Reply)
Hi,
How I change the timestamp of file to some past date
Let's say I have this file
-rw-r--r-- 1 oracle dba 16587 Apr 11 10:46 create_dev.sql
And I want to change the timestamp to Mar 10th 7:45 PM
So it should appear like this:
-rw-r--r-- 1 oracle dba ... (1 Reply)
Hello,
Alright solution:
I need to move files to a backup folder, changing the datestamp to the current day so that the file stays in the backup folder for the full 30 days before another script removes it. Obviously, any file I move in will preserve the timestamp which is what I *don't* want.... (2 Replies)
Please I am new to Unix and this simple question I am already answered but struggling to find the answer.
I have a data file which contains header record which conatins date timestamp. I need to find a way of simply updating the date time stamp to current date timestamp.
So if the header... (5 Replies)
Hello to all.
I work at AIX system without perl installed and I am restricted user, so I am limited to bash. In script that I am writing, I have to read line from file and transform date that I found inside to Unix timestamp. Line in file look something like this:
Tue Mar 29 06:59:00... (5 Replies)
Greetings,
I have an rsync server that is unable to change the timestamp on any directories inside of cifs mounts. The same thing happens on all of my red hat machines. These machines are all patched, touch -t works on directories inside any other filesystem including NFS mounts.
This is... (0 Replies)
Hi All,
I am new to unix programming. I am trying for a requirement and the requirement goes like this.....
I have a test folder. Which tracks log files. After certain time, the log file is getting overwritten by another file (randomly as the time interval is not periodic). I need to preserve... (2 Replies)
Hi team, i am writing a purge script to delete softlinks and hardlinks on linux system which are 3/10/30 days old. To test the script i need to create links with old timestamp, i am able to cange timestamp for files but not for links.
i tried touch -h option but this option is not available on... (1 Reply)
Hi Friends,
I have the following logfile. Currently time in india is 07/31/2014 12:33:34 and i have the following content in logfile. I want to display only those entries which contain string 'Exception' within last 3 hours. In this case, it would be the last line only
I can get the... (12 Replies)
Discussion started by: srkmish
12 Replies
LEARN ABOUT CENTOS
libtalloc_stealing
libtalloc_stealing(3) talloc libtalloc_stealing(3)NAME
libtalloc_stealing - Chapter 2: Stealing a context
Stealing a context
Talloc has the ability to change the parent of a talloc context to another one. This operation is commonly referred to as stealing and it
is one of the most important actions performed with talloc contexts.
Stealing a context is necessary if we want the pointer to outlive the context it is created on. This has many possible use cases, for
instance stealing a result of a database search to an in-memory cache context, changing the parent of a field of a generic structure to a
more specific one or vice-versa. The most common scenario, at least in Samba, is to steal output data from a function-specific context to
the output context given as an argument of that function.
struct foo {
char *a1;
char *a2;
char *a3;
};
struct bar {
char *wurst;
struct foo *foo;
};
struct foo *foo = talloc_zero(ctx, struct foo);
foo->a1 = talloc_strdup(foo, "a1");
foo->a2 = talloc_strdup(foo, "a2");
foo->a3 = talloc_strdup(foo, "a3");
struct bar *bar = talloc_zero(NULL, struct bar);
/* change parent of foo from ctx to bar */
bar->foo = talloc_steal(bar, foo);
/* or do the same but assign foo = NULL */
bar->foo = talloc_move(bar, &foo);
The talloc_move() function is similar to the talloc_steal() function but additionally sets the source pointer to NULL.
In general, the source pointer itself is not changed (it only replaces the parent in the meta data). But the common usage is that the
result is assigned to another variable, thus further accessing the pointer from the original variable should be avoided unless it is
necessary. In this case talloc_move() is the preferred way of stealing a context. Additionally sets the source pointer to NULL,
thus.protects the pointer from being accidentally freed and accessed using the old variable after its parent has been changed.
Version 2.0 Tue Jun 17 2014 libtalloc_stealing(3)