01-09-2015
Touch - changing date and time
Hi,
I am facing a problem with the command - TOUCH on Linux.
See the example below:
File on Linux: rw-rw-r-- user1 user1 Jan 01 09:00 test.txt
The file - test.txt was created by the user - user1.
Now, I want to change the date and time, but using other user - user2
The user2 belongs to the same user1 group.
if the command: touch -c -t 201501091030 test.txt - is issued, I have been receiving an error that the operation is not permitted.
However, if I use the command: touch -t 201501091030 xxx.txt , at the same directory, the file xxx.txt is created.
Does anyone know if the touch command is not allowed to change any information from other user, even if it is the same group?
Does anyone know how to solve it?
Tks.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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)
Discussion started by: monkfan
4 Replies
2. Shell Programming and Scripting
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)
Discussion started by: Prat007
5 Replies
3. Shell Programming and Scripting
Hey guy,
how to make the log.txt file and record date and time when ls, touch and find command run?
Thanks
Boly (13 Replies)
Discussion started by: chenboly
13 Replies
4. UNIX for Dummies Questions & Answers
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)
Discussion started by: rajivbravo
15 Replies
5. UNIX for Advanced & Expert Users
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)
Discussion started by: Peterh
4 Replies
6. Linux
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)
Discussion started by: markn86
2 Replies
7. Shell Programming and Scripting
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)
Discussion started by: bioinfo
5 Replies
8. UNIX for Advanced & Expert Users
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)
Discussion started by: N1a_Raider
5 Replies
9. SCO
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)
Discussion started by: dannychan
10 Replies
LEARN ABOUT DEBIAN
calife.auth
CALIFE.AUTH(5) BSD File Formats Manual CALIFE.AUTH(5)
NAME
calife.auth -- format of the calife authorization file
DESCRIPTION
The calife.auth files are files consisting of newline separated records, one per user, containing three colon (``:'') separated fields.
These fields are as follows:
name User's login name / @group.
shell User's shell
user1,user2,...,usern
List of logins allowed for the user name
The name field is the login used to access the computer account.
The login name must never begin with a hyphen (``-''); also, it is strongly suggested that neither upper-case characters or dots (``.'') be
part of the name, as this tends to confuse mailers. No field may contain a colon (``:'') as this has been used historically to separate the
fields in the user database.
One alternative syntax is to use @group to specify that any user in the given group is allowed to use calife to become root.
The shell field is the command interpreter the user prefers. If there is nothing in the shell field, the user's current shell as found in
the (/etc/passwd) file is assumed.
If the shell field is '*', then the account is considered as locked and access is denied.
If the third parameter is specified, it is assumed to be the list of login the current user has the right to become. It enables use of calife
for non-root only accounts.
calife.auth is placed in /etc.
EXAMPLE
# calife.auth-dist
#
# Format
#
# name[:shell_to_be_run][:user1,user2,usern]
#
fcb
roberto:/bin/tcsh
pb::guest,blaireau
SEE ALSO
calife(1), su(1)
HISTORY
A calife.auth file format appeared in DG/UX and SunOS, written for Antenne 2 in 1991. It has evolved with the extra shell specification. The
login list was reintroduced in 2.7.
AUTHOR
Ollivier Robert <roberto@keltia.frmug.fr.net>
BSD
September 25, 1994 BSD