02-26-2002
Thanks witt for your reply,
That was realy very helpful. But how do you implement this command to scan through several subdirectories and subsequently remove files that are older than 7 days of those subdirectories.
Thanks,
Odogbolu98
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
can anyone tell me how I would write a script in ksh on AIX that will delete files in a directory older than 7 days? (1 Reply)
Discussion started by: lesstjm
1 Replies
2. Shell Programming and Scripting
find /basedirectory -type f -mtime +3 >> /tmp/tempfile
find /basedirectory -type d -mtime +3 >> /tmp/tempfile
mailx -s "List of removed files and folders" myemail@domain.com < /tmp/te
mpfile
rm /tmp/tempfile
find /basedirectory -type f -mtime +3 -exec rm {} \;
find /basedirectory -type d... (7 Replies)
Discussion started by: melanie_pfefer
7 Replies
3. UNIX for Dummies Questions & Answers
This is driving me crazy. How can I delete files in a specifc directory that are over 30 days old? Thanks in advance. (3 Replies)
Discussion started by: tlphillips
3 Replies
4. Shell Programming and Scripting
Guys,
I had raised a question about deleting files older than today in a specific directory and i got this as an answer
find ${ARCH_DEST}/*.gz -mtime +0 -exec rm -f {} \;
What happens when there aren't files that meet this criteria ? Can it delete any other directories ? I had a shocking... (22 Replies)
Discussion started by: kamathg
22 Replies
5. Shell Programming and Scripting
i have to delete files which are older than 15 days or more except the ones in the directory Current and also *.sh files
i have found the command for files 15 days or more older
find . -type f -mtime +15 -exec ls -ltr {} \;
but how to implement the logic to avoid directory Current and also... (3 Replies)
Discussion started by: ali560045
3 Replies
6. Solaris
Hi all,
I want to delete log files with extension .log which are older than 30
days. How to delete those files?
Operating system -- Sun solaris 10
Your input is highly appreciated.
Thanks in advance.
Regards,
Williams (2 Replies)
Discussion started by: William1482
2 Replies
7. AIX
Hi i have tried searching and googling, but cant quite get there
I need to delete all files in a directory that are older than 15 days
here is what i have tried
find /path/to/files* -mtime +15 -exec del {} \;the first section works
find /path/to/files* -mtime +15but the del command dosent... (4 Replies)
Discussion started by: bluesteel
4 Replies
8. Shell Programming and Scripting
Hi All,
I am using below code to delete files older than 2 days. In case if there are no files, I should log an error saying no files to delete.
Please let me know, How I can achive this.
find /path/*.xml -mtime +2
Thanks and Regards
Nagaraja. (3 Replies)
Discussion started by: Nagaraja Akkiva
3 Replies
9. UNIX for Advanced & Expert Users
As one of our requirement was to connect to remote Linux server through SFTP connection and delete some files which are older than 7 days.
I used the below piece of code for that,
SFTP_CONNECTION=`sftp user_id@host ...
cd DESIRED_DIR;
find /path/to/files* -mtime +5 -exec rm -rf {} \;
bye... (2 Replies)
Discussion started by: ATWC
2 Replies
LEARN ABOUT FREEBSD
catman
CATMAN(1) BSD General Commands Manual CATMAN(1)
NAME
catman -- preformat man pages
SYNOPSIS
catman [-fLnrv] [directories ...]
DESCRIPTION
The catman utility preformats all the man pages in directories using the nroff -man command. Directories may be separated by colons instead
of spaces. If no directories are specified, the contents of the MANPATH environment variable is used, or if that is not set, the default
directory /usr/share/man is processed.
The options are as follows:
-f Force all man pages to be reformatted even if the corresponding cat page is newer.
-L Process only localized subdirectories corresponding to the locale specified in the standard environment variables.
-n Print out what would be done instead of performing any formatting.
-r Scan for and remove ``junk'' files that are neither man pages nor their corresponding formatted cat pages.
-v Cause catman to be more verbose about what it is doing.
ENVIRONMENT
LC_ALL, LC_CTYPE, LANG
These variables control what subdirectories will be processed if the -L option is used.
MACHINE If set, overrides the current machine type when searching for machine specific man page subdirectories.
MACHINE_ARCH
If set, overrides the current architecture when searching for architecture specific man page subdirectories.
MANPATH Determines the set of directories to be processed if none are given on the command line.
FILES
/usr/share/man Default directory to process if the MANPATH environment variable is not set.
EXIT STATUS
The catman utility exits 0 on success, and >0 if an error occurs.
SEE ALSO
makewhatis(1), man(1), nroff(1)
HISTORY
A previous version of the catman command appeared in FreeBSD 2.1.
AUTHORS
John Rochester
BSD
December 3, 2005 BSD