"On Linux you must be the file owner (or root) to change the modification time to a time other than the current time."
Interesting. I did not know that.
Quote:
Even though, I am still looking for a workaround for it.
Doing it as another user without permissions would be a "bug" or "security hole", not a workaround. You'll just have to arrange for it to be done as a different user. You could use sudo.
In sudoers:
In update-time.sh:
This will allow user2 to run /path/to/update-time.sh 201501091030 file.txt to update the time of files inside the /path/to/folder directory, and nowhere else.
Last edited by Corona688; 01-09-2015 at 01:30 PM..
Dear Expert,
Is there a command to do that in Unix?
In such a way that we don't need to actually "write" or
modified the content.
-- monkfan (4 Replies)
i want to find the files which are modified in last 30 to 120 minutes
i am using "find . -mmin +30 -mmin -120 "
it is giving me the error
find: bad option -mmin
find: path-list predicate-list
can somebody help me out .
Thank you (5 Replies)
Hi,
I am reciveing files from a remote system on my linux box. These files are named based on time, which I can use to 'touch' the time .
I can access/modify these files using my id. but when I tried touching time using my id I am getting error;
touch -t 1001261234 1001261234_job2333... (15 Replies)
Hello Everyone
I am running a Sunos 5.10 Generic_138888-02 sun4u sparc SUNW,SPARC-Enterprise machine with more than one virtual servers are on this box. My question is possable to change the date and time on the virtual server without change the time on the main server?
Thanks
Peter (4 Replies)
Hi guys,
Hope one of you guys can sort this out for me.
I first noticed this when users were uploading files from our website to our server and the time uploaded was +18 hours ahead of the current time. At first I assumed this was an issue with the coding, but didn't think it was likely as we... (2 Replies)
Hi,
I wish to change time stamp of a directory with all its subdirectories and files on server.
I am able to find following two ways but want to know which will be the better one. I have not tried anyone of them because I am not sure if it can effect my data:
find * -type d -exec touch... (5 Replies)
Here is the part of the script: I have modified the file name.:)
SSFILE=${My_HOME_DIR}/log/my_file_ss.log
export MM=`date '+%m'`
export DD=`date '+%d'`
export HH=`date '+%H'`
export MIN=`date '+%M'`
export HOURAGO=`echo ${HH} -1 |bc `
echo $HOURAGO
export TTIME=${MM}${DD}${HOURAGO}00... (5 Replies)
I am using SCO Unix System V/386 Release 3.2v4.2 in some legacy machine.
I find that when I change the date time of the system, it will sometimes restart to the scologin page
It seems to be related to the X11 because other sessions (not scologin session) will not be affected.
Is there... (10 Replies)