Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
deleting files older than 2 days
Name: anukta_c Date: December 24, 2002 at 04:31:01 Pacific OS: HP-UX CPU/Ram: -
Comment:
Hi,
I want to delete files which had been created 2 days ago having names like: er_n5412_output_yyyymmdd.csv.processd from the directory /opt/apps/ccba/dev/callftp/cps_adhoc. There will be several other files in the same directory which I would not want to delete.
There might be files having names like er_n5412_output_yyyymmdd.csv, these I will not want to delete.
I want to write a script to do this.
I know this can be done with find command, but I cannot get the syntax right.Also, is it possible to explicitly mention the path and the file name matching pattern?
Summary: Hi, I am trying to delete log files older than a certain date using a Korn shell script. The best suggestion I've found (on this board) is to calculate the date of two weeks ago (very difficult) and t...
Summary: I am new to shell scripting. The requirement is as follows: At the beginning of the script, check file creation date. If it's more than 2 days old, rename the file with prefix "backlog". I would reall...
Summary: Hi, I have to move files older than 4 hours from a directory to another. How to find these file ? The find command with -mtime can't be applied because time is up than 24 hours. Thanks ...