03-25-2015
According to the standards, the
utime(path, times) function is required to return -1 with errno set to EPERM (which is 1 on most UNIX Systems) when:
Quote:
The times argument is not a null pointer and the effective user ID of the calling
process does not match the owner of the file and the calling process does not
have appropriate privileges.
The system you're using seems to be meeting the requirements of the standards on this issue.
This User Gave Thanks to Don Cragun For This Post:
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Does anyone know how to display the time with seconds
of when a file was last modified. I can get hour & minutes but
would also like seconds. --Running AIX (1 Reply)
Discussion started by: edog
1 Replies
2. UNIX for Dummies Questions & Answers
Good morning,
I would like to find all files of a certain type and display their name as well as their modification date.
In order to do this, I would do the following:
find ./ -name *.csv | ????????
My question: what to put after the pipe instead of the question marks? Is there a basic... (5 Replies)
Discussion started by: scampsd
5 Replies
3. UNIX for Dummies Questions & Answers
Hi
I am accessing a file on nfs mounted device, after completing using of the file, i am tring to restore the access time and modification times of the file.
So i got the previous modified time of the file using stat() function and trying to set the date and time for the file, To set these... (6 Replies)
Discussion started by: deepthi.s
6 Replies
4. Shell Programming and Scripting
How can I get and display the last modification time of a file? in scripting or specifically using Batch file
I want this info for me to determine whether an image has been edited or not by using the last modification time and compare it to our stored date of modification.
can somebody help... (5 Replies)
Discussion started by: jaque18
5 Replies
5. Shell Programming and Scripting
Hi All,
I would like to know the file modification time till seconds in Unix. So I tried ls -e and it worked fine. This Solaris 5.10
-rw-rw-r-- 1 test admin 22 Sep 12 11:01:37 2008 test_message
But I am not able to run the same command in SOlaris 5.6 and also in AIX/HP
Is there... (3 Replies)
Discussion started by: rahulkav
3 Replies
6. Shell Programming and Scripting
Hi All,
I have two files (given below) each exists under different paths. I want to compare the modification time stamp of file1.txt is lessthan the modification time of file2.txt.
month1=`ls -l file1.txt | awk '{ print $6}'`
date1=`ls -file1.txt | awk '{ print $7}'`
time1=`ls... (1 Reply)
Discussion started by: Arunprasad
1 Replies
7. UNIX for Dummies Questions & Answers
Hi all,
I need the modification time of a file on a particular day say 3 days before.
I just don't want the last modification time. I need all the modification times on a particualar day.
Is there anyway to do it? Kindly help. Could anyone tell me where the modification time is stored?... (1 Reply)
Discussion started by: vidhyab
1 Replies
8. UNIX for Dummies Questions & Answers
I'm trying to get the date output to be in the form yyyy-mm-dd (e.g. 2013-01-18)
!/bin/sh
modDate=$(stat -c %y $1)
echo $modDate >> $1
When I run this on another file (by typing ./dateScript theFile.txt), I keep getting this message:
stat: illegal option -- c
What's wrong with my code... (2 Replies)
Discussion started by: Nate18
2 Replies
9. Shell Programming and Scripting
Explain it with proper e.g (4 Replies)
Discussion started by: sidpatil
4 Replies
10. Shell Programming and Scripting
SunOS -s 5.10 Generic_147440-04 sun4u sparc SUNW,SPARC-Enterprise
Hi,
In a folder, there are files. I have a script which reads the current date and subtract the modification date of each file.
How do I achieve this?
Regards,
Joe (2 Replies)
Discussion started by: roshanbi
2 Replies
LEARN ABOUT DEBIAN
ns_truncate
ns_file(3aolserver) AOLserver Built-In Commands ns_file(3aolserver)
__________________________________________________________________________________________________________________________________________________
NAME
ns_chmod, ns_cp, ns_cpfp, ns_ftruncate, ns_link, ns_mkdir, ns_rename, ns_rmdir, ns_symlink, ns_truncate, ns_unlink - File manipulation com-
mands
SYNOPSIS
ns_chmod option ?arg arg ...?
ns_cp option ?arg arg ...?
ns_cpfp option ?arg arg ...?
ns_ftruncate option ?arg arg ...?
ns_link option ?arg arg ...?
ns_mkdir option ?arg arg ...?
ns_rename option ?arg arg ...?
ns_rmdir option ?arg arg ...?
ns_symlink option ?arg arg ...?
ns_truncate option ?arg arg ...?
ns_unlink option ?arg arg ...?
_________________________________________________________________
DESCRIPTION
ns_chmod filename mode
Change a file's access permissions. ns_chmod changes the specified file's permissions to mode, in the same manner as the Unix
chmod(1) command-line utility.
ns_cp -preserve file1 file2
Copy one file to another. ns_cp copies the contents of file1 to file2, just like the Unix "cp" command. The default directory is
the home directory for the server. If -preserve is specified, the copied file will retain the creation time, modification time,
owner, and mode of the original file, just like the Unix "cp -p" command.
ns_cpfp fileid1 fileid2 ?nbytes?
Copy a specified number of bytes from one file to another. ns_cpfp copies information from one file (fileid1) to another (fileid2).
If you specify a number of bytes in the nbytes argument, only the specified number of bytes will be copied. By default, the entire
file is copied.
ns_ftruncate fileid ?length?
Truncate an open file to a specified length. ns_ftruncate causes the open file specified by fileid to have a size of length bytes.
If length is not specified, it causes the file to have a size of zero bytes. The file must be open and be a regular file.
ns_link ?-nocomplain? filename1 filename2
Create a link. ns_link creates a link named filename2 that points to the file specified by filename1. If the link fails, a Tcl
error is generated, unless -nocomplain is specified.
ns_mkdir path
Create a directory. ns_mkdir creates the directory named PATH, just like the Unix mkdir command. By default, under Unix the direc-
tory is created with the file permissions set to 0755 (rwxr-xr-x.). These permissions can be modified by setting the umask parameter
for the server.
ns_rename file1 file2
Rename a file. ns_rename renames the first file (file1) to the file name specified by file2. Make sure that the files and the
directories in which the files exist are read/write accessible to the username that's running the AOLserver.
ns_rmdir path
Remove a directory. ns_rmdir removes the directory named path, just like the Unix rmdir command. The directory must already be
empty.
ns_unlink [-nocomplain] filename
Remove a file. ns_unlink attempts to remove the file filename. If -nocomplain is not passed in and the removal fails, a Tcl error
is generated.
ns_truncate filename ?length?
Truncate a file to a specified length. ns_truncate causes the file specified by filename to have a size of length bytes. If length
is not specified, it causes filename to have a size of zero bytes. The file must exist and be a regular file.
ns_unlink [-nocomplain] filename
Remove a file. ns_unlink attempts to remove the file filename. If -nocomplain is not passed in and the removal fails, a Tcl error
is generated.
SEE ALSO
ns_chmod, ns_cp, ns_cpfp, ns_ftruncate, ns_link, ns_mkdir, ns_rename, ns_rmdir, ns_symlink, ns_truncate, ns_unlink
KEYWORDS
AOLserver 4.0 ns_file(3aolserver)