The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Delete lines prior to a specific date in a log file. ahSher Shell Programming and Scripting 4 04-06-2009 06:19 AM
Display files created on particular date amit_kv1983 UNIX for Dummies Questions & Answers 6 04-24-2008 07:40 AM
command to list files that are created before some date csreenivas SUN Solaris 3 06-27-2007 07:34 PM
How to list files with specific created date Draculla Filesystems, Disks and Memory 2 05-04-2007 12:45 AM
List files created between specific date and time jazjit Shell Programming and Scripting 3 04-27-2007 02:19 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 05-05-2009
moustafashawky moustafashawky is offline
Registered User
  
 

Join Date: May 2009
Posts: 2
Lightbulb Delete files created before specific date.

There is a system logging a huge amount of data and we need to delete some of the older logs .I mean the files that are created before one week from today. Here is a listing of files that are sitting there:
/usr/WebSphere/AppServer/logs
# ls -l
-rw-r--r-- 1 root system 3740694 May 03 13:14 eFlow.log
-rw-r--r-- 1 root system 2863367 Feb 17 23:59 eFlow.log2009-02-17
-rw-r--r-- 1 root system 7089482 Feb 18 23:59 eFlow.log2009-02-18
-rw-r--r-- 1 root system 7092836 Feb 19 23:59 eFlow.log2009-02-19
-rw-r--r-- 1 root system 7066516 Feb 20 23:59 eFlow.log2009-02-20
-rw-r--r-- 1 root system 7565633 Feb 21 23:59 eFlow.log2009-02-21
-rw-r--r-- 1 root system 7208210 Feb 27 23:59 eFlow.log2009-02-27
-rw-r--r-- 1 root system 7923604 Feb 28 23:59 eFlow.log2009-02-28
-rw-r--r-- 1 root system 7092836 Mar 01 23:59 eFlow.log2009-03-01
-rw-r--r-- 1 root system 9994678 Mar 02 23:59 eFlow.log2009-03-02
-rw-r--r-- 1 root system 7542130 Mar 03 23:59 eFlow.log2009-03-03
-rw-r--r-- 1 root system 7091377 Mar 04 23:59 eFlow.log2009-03-04
-rw-r--r-- 1 root system 6249702 Mar 06 23:59 eFlow.log2009-03-06
-rw-r--r-- 1 root system 7046123 Mar 07 23:59 eFlow.log2009-03-07
-rw-r--r-- 1 root system 7085965 Mar 08 23:59 eFlow.log2009-03-08
-rw-r--r-- 1 root system 7088620 Mar 09 23:59 eFlow.log2009-03-09
-rw-r--r-- 1 root system 7088620 Mar 10 23:59 eFlow.log2009-03-10
-rw-r--r-- 1 root system 7077497 Mar 11 23:59 eFlow.log2009-03-11
-rw-r--r-- 1 root system 6585525 Mar 13 23:59 eFlow.log2009-03-13
-rw-r--r-- 1 root system 7027121 Mar 14 23:59 eFlow.log2009-03-14
-rw-r--r-- 1 root system 7087194 Mar 15 23:59 eFlow.log2009-03-15
-rw-r--r-- 1 root system 7087194 Mar 16 23:59 eFlow.log2009-03-16
-rw-r--r-- 1 root system 7082678 Mar 17 23:59 eFlow.log2009-03-17
-rw-r--r-- 1 root system 7087194 Mar 18 23:59 eFlow.log2009-03-18
-rw-r--r-- 1 root system 44349749 Mar 19 23:59 eFlow.log2009-03-19
-rw-r--r-- 1 root system 9859356 Mar 20 23:59 eFlow.log2009-03-20
-rw-r--r-- 1 root system 10412244 Mar 21 23:59 eFlow.log2009-03-21
-rw-r--r-- 1 root system 8315508 Mar 22 23:59 eFlow.log2009-03-22
-rw-r--r-- 1 root system 7092836 Mar 23 23:59 eFlow.log2009-03-23
-rw-r--r-- 1 root system 8212466 Mar 24 23:59 eFlow.log2009-03-24
-rw-r--r-- 1 root system 7637270 Mar 25 23:59 eFlow.log2009-03-25
-rw-r--r-- 1 root system 43091141 Mar 26 23:59 eFlow.log2009-03-26
-rw-r--r-- 1 root system 7350430 Mar 27 23:59 eFlow.log2009-03-27
-rw-r--r-- 1 root system 7062982 Mar 28 23:59 eFlow.log2009-03-28
-rw-r--r-- 1 root system 7092836 Mar 29 23:59 eFlow.log2009-03-29
-rw-r--r-- 1 root system 7598982 Mar 30 23:59 eFlow.log2009-03-30
-rw-r--r-- 1 root system 7358271 Mar 31 23:59 eFlow.log2009-03-31
-rw-r--r-- 1 root system 7088996 Apr 01 23:59 eFlow.log2009-04-01
-rw-r--r-- 1 root system 42804120 Apr 02 23:59 eFlow.log2009-04-02
-rw-r--r-- 1 root system 8162814 Apr 03 23:59 eFlow.log2009-04-03
-rw-r--r-- 1 root system 10470761 Apr 04 23:59 eFlow.log2009-04-04
-rw-r--r-- 1 root system 10512896 Apr 05 23:59 eFlow.log2009-04-05
-rw-r--r-- 1 root system 44687293 Apr 06 23:59 eFlow.log2009-04-06
-rw-r--r-- 1 root system 7090632 Apr 07 23:59 eFlow.log2009-04-07
-rw-r--r-- 1 root system 8356189 Apr 08 23:59 eFlow.log2009-04-08
-rw-r--r-- 1 root system 46229290 Apr 09 23:59 eFlow.log2009-04-09
-rw-r--r-- 1 root system 6170341 Apr 10 23:59 eFlow.log2009-04-10
-rw-r--r-- 1 root system 7048246 Apr 11 23:59 eFlow.log2009-04-11
-rw-r--r-- 1 root system 7091275 Apr 12 23:59 eFlow.log2009-04-12
-rw-r--r-- 1 root system 7092836 Apr 13 23:59 eFlow.log2009-04-13
-rw-r--r-- 1 root system 7250532 Apr 14 23:59 eFlow.log2009-04-14
-rw-r--r-- 1 root system 6723072 Apr 15 23:59 eFlow.log2009-04-15
-rw-r--r-- 1 root system 43798773 Apr 16 23:59 eFlow.log2009-04-16
-rw-r--r-- 1 root system 6626049 Apr 17 23:59 eFlow.log2009-04-17
-rw-r--r-- 1 root system 6658579 Apr 18 23:59 eFlow.log2009-04-18
-rw-r--r-- 1 root system 6721511 Apr 19 23:59 eFlow.log2009-04-19
-rw-r--r-- 1 root system 18957673 Apr 20 23:59 eFlow.log2009-04-20
-rw-r--r-- 1 root system 6721511 Apr 21 23:59 eFlow.log2009-04-21
-rw-r--r-- 1 root system 7717785 Apr 22 23:59 eFlow.log2009-04-22
-rw-r--r-- 1 root system 42807804 Apr 23 23:59 eFlow.log2009-04-23
-rw-r--r-- 1 root system 7029300 Apr 24 23:59 eFlow.log2009-04-24
-rw-r--r-- 1 root system 6677253 Apr 25 23:59 eFlow.log2009-04-25
-rw-r--r-- 1 root system 7184666 Apr 26 23:59 eFlow.log2009-04-26
-rw-r--r-- 1 root system 6835662 Apr 27 23:59 eFlow.log2009-04-27
-rw-r--r-- 1 root system 2408802 Apr 28 23:59 eFlow.log2009-04-28
-rw-r--r-- 1 root system 6774561 Apr 29 23:59 eFlow.log2009-04-29
-rw-r--r-- 1 root system 73019 Apr 30 00:18 eFlow.log2009-04-30
-rw-r--r-- 1 root system 39808025 May 02 23:59 eFlow.log2009-05-02
 

Bookmarks

Tags
date, delete, files

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:02 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0