hi. I need help my programing friends :p
I need to list all the files with a certain name (for example FileName) by last modification date but only the one with the last date. If there are two files with the same name and same modification date it should print the both.
For example in this set... (6 Replies)
Hi,
I was very surprised to not be able to find an answer to this question despite my best efforts in Google and elsewhere. Maybe it's a good thing as it forced me to finally become a member in this great forum that i use frequently.
Ok my question:
I want to be able to sort files inside a... (3 Replies)
Hi all
i am having so many files in my directory.Is there any option
to copy files based on date.
example
i am having file this
-rw-rw-r-- 1 ram user 1 Feb 2 17:12 abc
-rw-rw-r-- 1 ram user 1 Feb 2 17:12 bnw
-rwxrwxr-x 1 ram user 21122 Feb 4... (3 Replies)
Hi everyone,
I have files like file1_Mod.txt, file2_Mod.txt. I want to rename the old files with the last modification date. I write the below script to rename with current date, but I donīt know how to use "date -r" to get the last modification date with the same format I have below... (5 Replies)
Hi All,
I need to list the files based modification time of the files from a directory, I cannot use "ls -t" as there are lot of files, which "ls" command cannot handle. New files will land there daily. So iam looking for an alternative through "find"command.
All suggestions are welcomed.
... (6 Replies)
Hi, I have a requirement to copy files from a windows network drive to a Linux server using shell script based on the last created date.
Ex:
FileName CreatedDate/Time
F1 05-01-2012 3:00 PM
F2 05-01-2012 3:15 PM
F3 05-01-2012 2:00 PM
When i run the shell script... (1 Reply)
Hi All,
Really stuck up with a requirement where I need to move a file (Lets say date_Employee.txt--the date will have different date values like 20120612/20120613 etc) from one directory to another based on creation/modification dates.
While visiting couple of posts, i could see we can... (3 Replies)
Hi All,
I am new to shell srcipting.
Problem :
I need to write a script which copy the log files from /prod/logs directory based on todays date like (Jul 17) and place it to /home/hzjnr0 directory and then search the copied logfiles for the string "@ending successfully on Thu Jul 17". If... (2 Replies)
Hi I have a problem, I have a large group of archive files in a folder some are later versions of the same archive, the only difference btween them is that the archiving program we use appends the name with a code for it to keep track of in its data base, and the modification date.
I am starting... (6 Replies)
Discussion started by: Paul Walker
6 Replies
LEARN ABOUT X11R4
acl
acl(2)acl(2)NAME
acl, facl - get or set a file's Access Control List (ACL)
SYNOPSIS
#include <sys/acl.h>
int acl(char *pathp, int cmd, int nentries, void aclbufp);
int facl(int fildes, int cmd, int nentries, void aclbufp);
The acl() and facl() functions get or set the ACL of a file whose name is given by pathp or referenced by the open file descriptor fildes.
The nentries argument specifies how many ACL entries fit into buffer aclbufp. The acl() function is used to manipulate ACL on file system
objects.
The following types are supported for aclbufp:
aclent_t Used by the UFS file system.
ace_t Currently unused.
The following values for cmd are supported:
SETACL nentries aclent_t ACL entries, specified in buffer aclbufp, are stored in the file's ACL. All directories in the path name
must be searchable.
GETACL Buffer aclbufp is filled with the file's aclent_t ACL entries. Read access to the file is not required, but all directo-
ries in the path name must be searchable.
GETACLCNT The number of entries in the file's aclent_t ACL is returned. Read access to the file is not required, but all directories
in the path name must be searchable.
ACE_SETACL nentries ace_t ACL entries, specified in buffer aclbufp, are stored in the file's ACL. All directories in the path name
must be searchable.
ACE_GETACL Buffer aclbufp is filled with the file's ace_t ACL entries. Read access to the file is not required, but all directories in
the path name must be searchable.
ACE_GETACLCNT The number of entries in the file's ace_t ACL is returned. Read access to the file is not required, but all directories in
the path name must be searchable.
Upon successful completion, acl() and facl() return 0 if cmd is SETACL. If cmd is GETACL or GETACLCNT, the number of ACL entries is
returned. Otherwise, -1 is returned and errno is set to indicate the error.
The acl() function will fail if:
EACCES The caller does not have access to a component of the pathname.
EFAULT The pathp or aclbufp argument points to an illegal address.
EINVAL The cmd argument is not GETACL, SETACL, or GETACLCNT; the cmd argument is SETACL and nentries is less than 3; or the
cmd argument is SETACL and the ACL specified in aclbufp is not valid.
EIO A disk I/O error has occurred while storing or retrieving the ACL.
ENOENT A component of the path does not exist.
ENOSPC The cmd argument is GETACL and nentries is less than the number of entries in the file's ACL, or the cmd argument is
SETACL and there is insufficient space in the file system to store the ACL.
ENOSYS The cmd argument is SETACL and the file specified by pathp resides on a file system that does not support ACLs, or the
acl() function is not supported by this implementation.
ENOTDIR A component of the path specified by pathp is not a directory, or the cmd argument is SETACL and an attempt is made to set
a default ACL on a file type other than a directory.
ENOTSUP The cmd argument is GETACL, but the ACL is composed of ace_t entries, and the ACL cannot be translated into aclent_t form.
The cmd is ACE_SETACL, but the underlying filesystem only supports ACLs composed of aclent_t entries and the ACL could not
be translated into aclent_t form.
EPERM The effective user ID does not match the owner of the file and the process does not have appropriate privilege.
EROFS The cmd argument is SETACL and the file specified by pathp resides on a file system that is mounted read-only.
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
getfacl(1), setfacl(1), aclcheck(3SEC), aclsort(3SEC)
9 Sep 2004 acl(2)