10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Requirement is to list the files older than 365 days from multiple directories and delete them and log the list of files which are deleted to a log file.
so 1 script should only list files older than 365 days for each directory separately to a folder
The other script should read these files... (7 Replies)
Discussion started by: prasadn
2. Shell Programming and Scripting
Is there a way to remove lines in a file that are older than x days (i.e. 30 days) based on the date stamp in the first column?
Sat Jan 11 14:12:06 EDT 2014
10-10-2013 09:00:01 AM|Line test 1234567
16-10-2013 08:30:00 AM|Line test... (6 Replies)
Discussion started by: brichigo
3. UNIX for Dummies Questions & Answers
how to compress the directories which is older 7 days.
If any one knows please help me this is urgent.
Thanks in advance (3 Replies)
Discussion started by: rameshpagadala
4. Shell Programming and Scripting
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
if ... (2 Replies)
Discussion started by: Navkreddy
5. Shell Programming and Scripting
I have crontab job a tar file to a directory ( tar -cvf /tmp/backup/or.`date +%m%d%y`. /ora/db/* ) , it will do it every day . Now I don't want to keep too much files , I just want to keep the file for 90 days , can advise if I want to remove the backup file which are elder than 90 days , can... (1 Reply)
Discussion started by: ust3
6. Shell Programming and Scripting
Motive: Search all directories which are older than 5 days.
Example: consider following directory structure:
abc/dir1 abc/dir1/dir abc/dir2 abc/dir3 abc/dir3/temp
Suppose dir1 and dir3 are 5 days older. Then I am looking for a command which lists abc/dir1 and abic/dir3 only so that... (4 Replies)
Discussion started by: mytempid07
7. Shell Programming and Scripting
Here's the deal...I have one directory with many subdirs and files.
What I want to find out is who is keeping old files and directories...say files and dirs that they didn't use since a number of n days, only one level under the initial dir. Output to a file.
A script for... (5 Replies)
Discussion started by: ejianu
8. Red Hat
I have dummies questions:
My script here can find the files in any directories older than 30 days then it will delete the files but not the directories. I would like to also be able to delete the directories that hold old files more than 30 days not just the files itself.
find . -type f... (2 Replies)
Discussion started by: lamoul
My requirement is need to delete the directories (Including files also) which are older than 7 days. So I used below command in one script (script takes 2 input parameters)
#$1 - Path of the directory from where we have to delete the directories.#
#$2 - Number of days older... (1 Reply)
Discussion started by: sridhar sivakot
10. Shell Programming and Scripting
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