Guys,
My log files stored in the date format format below(log_20080714072942):
TIMESTAMP=`date +%Y%m%d%H%M%S`
LOG=/log/log_${TIMESTAMP}.log
I'm looking for a shell script which deletes all files which is older than 3 months from today.
Regards,
Bhagat (3 Replies)
Hi, Friends,
I am writing a script to delete all the files which are there for more than 3 weeks.
I have tried this :
find /home/appl/backup -type f -mtime +21 -exec rm -f {} \;
But i am not sure if it deletes only the files in specified directory or all the directorinies in the provieded... (3 Replies)
hlow all
i have folder with name like this
20110512
20110601
20110602
so i want move the last 1 day to other directory for example this date 20110602 so i want move folder older 1 day from this date
20110512 -----> this folder will move to other dir
20110601-----> this folder will move... (2 Replies)
Hi
I am facing problem in using this command,
mv `find /export/june/PURGEDATA*.txt -mtime +2 -exec ls {} \;` june/archive/
mv: Insufficient arguments (1)
Usage: mv f1 f2
mv f1 ... fn d1
mv d1 d2
Thank you in advance (2 Replies)
Hello,
I have a script which finds files in a directory that are older than 30 days and moves them to the specified directory.
The problem is I don't know why it works the way it does?
Code:
find . -name '*.sql' ! -mtime -30 -exec mv '{}' /dataload/archivelogs \;
I was under the... (4 Replies)
To delete log files content older than 30 days and append the lastest date log file date in the respective logs
I want to write a shell script that deletes all log files content older than 30 days and append the lastest log file date in the respective logs
This is my script
cd... (2 Replies)
Hi,
I need a command for deleting all the compress files *.Z that are older than the current date - 5 days. Basically I have a directory where daily I meet some back up files and I want to remove automatically the ones 5 days (or more) older than the current date. How can I write a 'rm' command... (1 Reply)
If there are 100 files created in a directory /data/ today from 2:00 AM to 10:00 AM
I need to move files older than 3:00 AM to a new directory /hold/
How to do that?
Also, if I have to move files between 3:00 AM to 9:00 AM, how to achieve that (3 Replies)
Discussion started by: eskay
3 Replies
LEARN ABOUT OSF1
files
files(4) Kernel Interfaces Manual files(4)NAME
files - File control database (Enhanced Security)
DESCRIPTION
The file control database (/etc/auth/system/files) is designed to help the Information System Security Officer (ISSO) maintain the
integrity of the system. The database contains entries for system data files and executable files that require certain attributes. Some
files require certain attributes to provide protection against unauthorized access, while others require a specific set of attributes to
accomplish their intended function.
The database is used by the library routine create_file_securely() to determine the set of attributes for a newly created file. Many pro-
grams associated with the trusted computing base (TCB) use this library routine for file creation to ensure that file attributes are set
correctly.
A broad range of attributes can be specified in the file control database. Specific choices depend upon the exact system configuration.
These choices are as follows: This field specifies the owner name for the entry. If an owner name is not specified and the entry is created
using create_file_securely, the owner of the file will be the real user ID of the process creating the file. This field specifies the
group name for the entry. If a group name is not specified and the entry is created using create_file_securely, the group of the file will
be the real group ID of the process creating the file. This field specifies the mode word for the entry. If the mode word is not specified
and create_file_securely is used to create the entry, a mode word of 0 (zero) is assigned to the new file. This field identifies the type
of the entry. This field is not taken into account by create_file_securely when a file is being created. The library routine will only
create regular files. Choices for the type field are as follows: Regular file Directory FIFO device (pipe) Character special device Block
special device Socket
EXAMPLES
The following example is a typical file control database entry for the program /sbin/newfs: /sbin/newfs:f_owner=root:f_group=bin:
:f_type=r:f_mode#04111:
:chkent: This entry specifies that the newfs program has bin as its owner and group, that it is a regular file, and that its mode
is 0111
The following example shows an entry for a site-specific directory that contains help files for an application:
/appl/help_files:f_owner=appadmin:f_group=appl: :f_type=d:f_mode#0750: :chkent; This entry specifies the owner of the
/appl/help_files directory as appadmin, the group as appl, and the mode as 0750.
FILES
Specifies the pathname of the file control database.
RELATED INFORMATION
Functions: getprfient(3)
Files: authcap(4) delim off
files(4)