Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Find files older than 5 days and remove tem after listing Post 82623 by ypatel6871 on Saturday 3rd of September 2005 11:35:04 PM
Old 09-04-2005
Find files older than 5 days and remove tem after listing

need help with this ...

Find files older than 5 days and remove tem after listing

list "test" file older than 5 days and then remove them
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find files older than 20 days & not use find

I need to find files that have the ending of .out and that are older than 20 days. However, I cannot use find as I do not want to search in the directories that are underneath the directory that I am searching in. How can this be done?? Find returns files that I do not want. (2 Replies)
Discussion started by: halo98
2 Replies

2. Shell Programming and Scripting

Need to remove files older than 30 days except directories

Hi, I need to remove files (*.trc) which are older than 30 days from one location. My problem is there I do not want to visit any of the directories at that location. I want to search files at that particular location only (need to skip directorys at that location). maxdepth option is there... (6 Replies)
Discussion started by: malaymaru
6 Replies

3. Shell Programming and Scripting

How to tar, compress and remove files older than two days

Hi, I'm Eddy from Belgium and I've the following problem. I try to write a ksh script in AIX to tar, compress and remove the original *.wav files from the directory belgacom_sf_messages older than two days with the following commands. The problem is that I do not find a good combination... (4 Replies)
Discussion started by: edr
4 Replies

4. Shell Programming and Scripting

How to find files older than 30 days

Dear Friends, I have two queries. 1) I want to see the list of folders which were created 29 days ago. 2) I want to see the folders in which last created file is older than 29 days. Can it be done? Thank you in advance Anushree (4 Replies)
Discussion started by: anushree.a
4 Replies

5. UNIX Desktop Questions & Answers

Find files older than 10 days

What command arguments I can use in unix to list files older than 10 days in my current directory, but I don't want to list the hidden files. find . -type f -mtime +15 -print will work but, it is listing all the hidden files., which I don't want. (4 Replies)
Discussion started by: Pouchie1
4 Replies

6. Shell Programming and Scripting

script to remove files older than 60 days

Hi I need help in the script which looks at a contorl file which has a list of file names like xxxx.12345 and I want to take only xxxxx and search in a specific directory and remove the file if its older than 60 days I have written something like this.. but seems to be wrong... (1 Reply)
Discussion started by: antointoronto
1 Replies

7. UNIX for Advanced & Expert Users

find files older than 30 days old

Hello, I have a script which finds files in a directory that are older than 30 days and remove them. The problem is that these files are too many and when i run this command: find * -mtime +30 | xargs rm I run this command inside the directory and it returns the error: /usr/bin/find:... (8 Replies)
Discussion started by: omonoiatis9
8 Replies

8. Shell Programming and Scripting

Remove files older than 2 days.

Hi All, I am new to the scripting and using solaris 10 OS. Please suggest me from the below script which modifications need to be done to delete the files more that 2days older. Current script is deleting existing file. # Remove old explorer runs if needed DIR=`dirname ${EXP_TARGET}` if ... (2 Replies)
Discussion started by: Navkreddy
2 Replies

9. Shell Programming and Scripting

Shellscript command to remove files starting with a certain string, and older than 3 days

Hi All, Need help in identifying a shellscript command to remove all files on a server directory, starting with a certain prefix and also older than 3 days. That means files created with that prefix, today or yesterday, shouldn't be removed. Thanks, Dev (3 Replies)
Discussion started by: dev.devil.1983
3 Replies

10. Shell Programming and Scripting

Listing files older than 30 days

Hi, Could someone help me that what the problem is in this code? #!/bin/sh FOLDER=/abc/datasource/checkstatus TIMESTAMP=$(date +%s) for filename in $(find $FOLDER -maxdepth 1 -type f -name "CHECK_STATUS*"); do f1=$($filename -Eo "{4}+") f2=$(date -d "$f1" +%s) if... (11 Replies)
Discussion started by: Home
11 Replies
wcmgr(1)							   The Webalizer							  wcmgr(1)

NAME
wcmgr - Webalizer (DNS) Cache file Manager SYNOPSIS
wcmgr [ option ... ] cache-file DESCRIPTION
wcmgr is a utility program which allows manipulation of the DNS cache files used and produced by The Webalizer. Each record in the cache file contains an IP address (either IPv4 or IPv6), a timestamp of when the entry was added to the cache, a flag to indicate if the record contains a resolved name or not, and either the same IP address or a resolved host name. All records are accessed by their IP address. RUNNING WCMGR
wcmgr was designed to be run from the Unix shell command line. This facilitates its use in shell scripts and other automated processes. A valid DNS cache file must be specified. Command line options are optional, and if none are given, the default action is to list the con- tents of the specified cache file. COMMAND LINE OPTIONS
Different functions are selected by using one or more of the following command line options. If no options are given, the default is to display the contents of the cache file to the screen (stdout). -h Display all available command line options and exit. -v Be verbose. -V Display the program version and exit. Additional program specific information will be displayed if verbose mode is also used (e.g. '-vV'), which can be useful when submitting bug reports. -a address [-n hostname] [-t0] Add a new record to the cache file. The IP address will be added to the cache file using the current time as the timestamp and with a resolved name hostname. If -t0 is specified, the record will be considered permanent, and will not be removed (during a purge) or expired. If a hostname is not specified with the -n option, then the address will be used instead, and the record will be flagged as unresolved. -c Create a new cache file. If used alone, this option will create a new, empty cache file. If used with the import option, a new cache file will be created before importing the data. An error will occur if the file cache-file already exists. -d address Delete a record from the cache file using the specified address. -f address Find and display information for address from the cache file. A single line similar to that produced by the -l option will be dis- played unless verbose mode is enabled, in which case a more detailed listing will be produced. -i name [-c] Import data into the cache file from the file name. The import file must be a valid tab delimited text file, such as that created by the export option. If the imported data contains records already present in the cache file, those records will be overwritten by the imported data. The cache file must exist unless the -c option is specified, in which case, a new cache file will be created for the imported data. -l List the contents of the cache file. This is the default action of the program, so does not necessarily need to be specified. If verbose mode is enabled, a report title, column headers and summary totals will also be displayed. -p num Purge the cache file of entries older than num days. If num is not specified, then a default of 7 days will be used. if verbose mode is enabled, each purged record will be printed and the total number of purged records will be displayed. -s [-t num] Display cache file information/statistics. If a TTL value (in days) is specified using the -t option, it will be used to calculate how many records are older than num days, otherwise, the default value of 7 days will be used. -n name Specify the name to use as the resolved hostname when adding records to the cache. -t num Time to live (TTL) value. If used along with the -p (purge) option, it specifies how many days a record will remain valid. Any record that is older than num days is considered expired and will be purged. If used with the -a (add) option, a zero value will cause the record to be considered permanent. -x name Export data from a cache file to a tab delimited text file named name. If the text file name exists, it will be overwritten. BUGS
Please report bugs to the author. COPYRIGHT
Copyright (C) 1997-2011 by Bradford L. Barrett. Distributed under the GNU GPL. See the files "COPYING" and "Copyright", supplied with all distributions for additional information. AUTHOR
Bradford L. Barrett <brad at mrunix dot net> Version 1.00 12-Jul-2008 wcmgr(1)
All times are GMT -4. The time now is 12:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy