Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to delete files which are 7 days old Post 2104 by kikkin on Thursday 19th of April 2001 08:14:17 PM
Old 04-19-2001
Can u explain this command. please!
kikkin
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

delete files older than 7 days

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. UNIX for Dummies Questions & Answers

How can I delete files older than 7 days?

I will like to write a script that delete all files that are older than 7 days in a directory and it's subdirectories. Can any one help me out witht the magic command or script? Thanks in advance, Odogboly98:confused: (3 Replies)
Discussion started by: odogbolu98
3 Replies

3. UNIX for Dummies Questions & Answers

How to delete files over 30 days

I have a directory that contains files. I would like the command that deletes all files that are over 30 days old. Delete files based on creation date and not modified. (2 Replies)
Discussion started by: GEBRAUN
2 Replies

4. UNIX for Dummies Questions & Answers

how can i delete last 7 days mofified files

how can i delete last 7 days mofified files(need command please...........) (3 Replies)
Discussion started by: ss4u
3 Replies

5. UNIX for Dummies Questions & Answers

Delete files older than 30 days

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

6. Shell Programming and Scripting

delete files more than 15 days older

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

7. Shell Programming and Scripting

Delete files from sub-directories over 7 days

Can any one please help me in deleting all the Files over 7 days from sub-directories A, B, C... Top-Directory Sub-Directory-A File-1 File-2 ..... File-n Sub-Directory-B File-1 File-2 ..... File-n Sub-Directory-C File-1 ... (1 Reply)
Discussion started by: sureshcisco
1 Replies

8. Solaris

Delete files older than 30 days

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

9. Shell Programming and Scripting

Delete files older than X days.

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

10. Shell Programming and Scripting

Delete files 30 days old

Will this work to delete files 30 days old in $backupDir or is there a better way to do it? find $backupDir -type f -mtime +30 -exec rm {} \; (2 Replies)
Discussion started by: wyclef
2 Replies
uucleanup(8)						      System Manager's Manual						      uucleanup(8)

NAME
uucleanup - Deletes selected old files from the uucp spool directory SYNOPSIS
uucleanup [options] FLAGS
If you specify one of the following flags, you must provide a value for days. The default value listed is used if the flag is not speci- fied. Removes any C.*(Command) files as old as or older than the number of days specified by days, and sends appropriate information to the requester. The default is 7 days. The -C and -W flags cannot be combined. Removes any D.*(Data) files as old as or older than the number of days specified in days. Also attempts to deliver any remaining mail messages. The default is 7 days. Includes a specified line of text in the warning message generated by the -W flag. The default line is: We have been unable to contact machine machine_name since you queued your job. The -m flag can be used only with the -W flag. Removes files in addition to those specified by the -C, -D, and -X flags that are as old as or older than the number of days specified in days. The default is 2 days. Executes uucleanup only on the spool directory specified by system. The default is to clean up all uucp spool directories. Note that system names can contain only ASCII characters. Removes TM.* (Temporary) files as old as or older than the number of days specified by the days argument. Also attempts to deliver any remaining mail messages. The default is 7 days. Sends a mail message to the requester warning that C*. files as old as or older than the number of days specified in days are still in the spool direc- tory. The message includes the job ID and, in the case of mail, the mail message. The administrator can use the -m flag to include a message line telling who to call to check the problem. The default is 1 day. Removes any X.*(Execute) files as old as or older than the number of days specified in days. The default is 2 days. Displays debugging information on the screen of the local termi- nal; level must be an integer from 0 to 9. The higher the number, the more detailed the debugging information. DESCRIPTION
The uucleanup program removes outdated files from the spool directory /usr/spool/uucp. The uucleanup program scans the /usr/spool/uucp spool directory for old files and takes appropriate action to remove them in a useful way. The uucleanup command performs the following tasks: Informs the requester of send/receive requests for systems that cannot be reached Warns users about requests that wait more than a specified number of days (the default is 1 day) Returns mail that cannot be delivered to the sender Removes all other files older than a specified number of days from the spool directory. The uucleanup program is not usually invoked from the command line, but is executed by the shell procedure uudemon.cleanu located in /usr/lib/uucp, which in turn is started by the cron script located in /usr/adm/cron/crontabs/uucp. Only someone with superuser privileges can issue the uucleanup command from the command line. To enable automatic cleanup, edit the file /usr/adm/cron/crontabs/uucp. Remove the # (number sign) from the beginning of the uude- mon.cleanu line. EXAMPLES
To locate files, enter: # uucleanup -W2 This form of the command locates C.* (Command) files 2 or more days old and warns the requesters that the files have not been sent. To send a message with a warning, enter: # uucleanup -W2 -mContact the System Admin about these files This form of the command locates C.* (Command) files 1 or more days old (the default), warns requesters their files have not been sent, and gives them the message: Contact the System Admin about these files. To clean up command files that are 8 or more days old, enter: # uucleanup -C8 This form of the command removes all C.* (Command) files 8 or more days old and sends an appropriate message to the requesters. Other uucp spool files are removed based on the default value for that type. To clean up data and execute files, enter: # uucleanup -D7 -X3 This form of the command removes all D.* (Data) files 7 or more days old (the default) and all X.* (Execute) files older than 3 days and attempts to deliver all undelivered mail. Remaining uucp spool files are removed based on the default value for that type. To clean up other files, enter: # uucleanup -o2 This form of the command removes uucp spool files according to their default values except for other files, which are removed if 2 days or older. To clean up all files at once, enter the command without flags: # uucleanup This form of the command removes all C.*, D.*, and X.* files, and all other files older than the default times. To clean up files for system hera, enter: # uucleanup -shera -C5 This form of the command removes all C.* files 5 or more days old and the other uucp spool files according to their default files for system hera (the files are in /usr/spool/uucp/hera/*). FILES
Specifies the command path. File that starts uudemon.cleanu shell procedure. Contains all the configuration files for uucp, and the uude- mon.cleanu shell procedure. Schedules uucp jobs for the cron daemon, including the uudemon.cleanu shell procedure. Contains files removed by the uucleanup command. RELATED INFORMATION
Commands: cron(8), uucp(1), uustat(1), uux(1) delim off uucleanup(8)
All times are GMT -4. The time now is 07:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy