Sponsored Content
Full Discussion: Delete File Based On Date
Top Forums UNIX for Advanced & Expert Users Delete File Based On Date Post 302219716 by adzuanamir on Wednesday 30th of July 2008 12:11:57 AM
Old 07-30-2008
Delete File Based On Date

Hi Xpert Out There

I have a lots of file in this path :

-rw-r----- 1 oracle dba 3954176 Dec 21 2006 1_2008.dbf
-rw-r----- 1 oracle dba 887808 Dec 21 2006 1_2009.dbf
-rw-r----- 1 oracle dba 143872 Dec 21 2006 1_2010.dbf
-rw-r----- 1 oracle dba 33792 Dec 21 2006 1_2011.dbf
-rw-r----- 1 oracle dba 1536 Dec 21 2006 1_2012.dbf
-rw-r----- 1 oracle dba 1024 Dec 21 2006 1_2013.dbf
-rw-r----- 1 oracle dba 31744 Dec 21 2006 1_2014.dbf
-rw-r----- 1 oracle dba 104857088 Dec 22 2006 1_2015.dbf
-rw-r----- 1 oracle dba 104857088 Dec 24 2006 1_2016.dbf
-rw-r----- 1 oracle dba 1048064 Dec 24 2006 1_2017.dbf
-rw-r----- 1 oracle dba 104857088 Dec 25 2006 1_2018.dbf
-rw-r----- 1 oracle dba 1048064 Dec 25 2006 1_2019.dbf

Now i want to delete all file date on 2006 with single command. How to do this???
By the way, i'm using solaris 9....TQ in advance
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Based on the permision in the dir can i delete the file

All, I am having a directory as drwxrwsr-x 3 intermec intermec 10240 Jan 8 09:07 intermec inside the directory . the files are like cd -rw-r----- 1 intrmc01 intermec 5226 Dec 2 15:03 AST07356.txt -rw-r----- 1 intrmc01 intermec 5025 Dec 2 12:51... (4 Replies)
Discussion started by: arunkumar_mca
4 Replies

2. Shell Programming and Scripting

Delete block of text in one file based on list in another file

Hi all I currently use the following in shell. #!/bin/sh while read LINE do perl -i -ne "$/ = ''; print if !m'Using archive: ${LINE}'ms;" "datafile" done < "listfile" NOTE the single quote delimiters in the expression. It's highly likely the 'LINE' may very well have characters in it... (3 Replies)
Discussion started by: Festus Hagen
3 Replies

3. UNIX for Dummies Questions & Answers

Delete lines with duplicate strings based on date

Hey all, a relative bash/script newbie trying solve a problem. I've got a text file with lots of lines that I've been able to clean up and format with awk/sed/cut, but now I'd like to remove the lines with duplicate usernames based on time stamp. Here's what the data looks like 2007-11-03... (3 Replies)
Discussion started by: mattv
3 Replies

4. Shell Programming and Scripting

Delete log file entries based on the Date/Timestamp within log file

If a log file is in the following format 28-Jul-10 ::: Log message 28-Jul-10 ::: Log message 29-Jul-10 ::: Log message 30-Jul-10 ::: Log message 31-Jul-10 ::: Log message 31-Jul-10 ::: Log message 1-Aug-10 ::: Log message 1-Aug-10 ::: Log message 2-Aug-10 ::: Log message 2-Aug-10 :::... (3 Replies)
Discussion started by: vikram3.r
3 Replies

5. UNIX for Dummies Questions & Answers

Delete a row from a file if one column containing a date is greater than the current system date

Hello gurus, I am hoping someone can help me with the required code/script to make this work. I have the following file with records starting at line 4: NETW~US60~000000000013220694~002~~IT~USD~2.24~20110201~99991231~01~01~20101104~... (4 Replies)
Discussion started by: chumsky
4 Replies

6. Shell Programming and Scripting

delete a row in csv file based on the date

Hi, I have a csv file with old data..i need to have only last 30 days from the current dateof data in the file.The fourth field in the file is a date field.i need to write a script to delete the old data by comparing the the fourth field with the (current date -30).I need to delete the rows in... (2 Replies)
Discussion started by: pals70423
2 Replies

7. Shell Programming and Scripting

Delete log files content older than 30 days and append the lastest date log file date

To delete log files content older than 30 days and append the lastest date log file date in the respective logs I want to write a shell script that deletes all log files content older than 30 days and append the lastest log file date in the respective logs This is my script cd... (2 Replies)
Discussion started by: sreekumarhari
2 Replies

8. Shell Programming and Scripting

Script to determine Date,TotalFile,total size of file based on date

I have file listed like below -rw-r--r--+ 1 test test 17M Nov 26 14:43 test1.gz -rw-r--r--+ 1 test test 0 Nov 26 14:44 test2.gz -rw-r--r--+ 1 test test 0 Nov 27 10:41 test3.gz -rw-r--r--+ 1 test test 244K Nov 27 10:41 test4.gz -rw-r--r--+ 1 test test 17M Nov 27 10:41 test5.gz I... (5 Replies)
Discussion started by: krish2014
5 Replies

9. HP-UX

HP/UX command to pull file name/date based on date

HI, Can anyone tell me how to pull the date and file name separated by a space using the find command or any other command. I want to look through several directories and based on a date timeframe (find -mtime -7), output the file name (without the path) and the date(in format mmddyyyy) to a... (2 Replies)
Discussion started by: lnemitz
2 Replies

10. Shell Programming and Scripting

Delete oldest folder based on folder named as date

Hi, I have a script doing backup to synology server, the script create new folder each day with the date as being folder name i.e. 2018-07-30. Just before creating the new folder I want the script to find the oldest folder from the list and delete it including its content. for example... (3 Replies)
Discussion started by: humble_learner
3 Replies
XBase::SDBM(3pm)					User Contributed Perl Documentation					  XBase::SDBM(3pm)

NAME
XBase::SDBM - SDBM index support for dbf DESCRIPTION
When developing the XBase.pm/DBD::XBase module, I was trying to support as many existing variants of file formats as possible. The module thus accepts wide range of dbf files and their versions from various producers. But with index files, the task is much, much harder. First, there is little or no documentation of index files formats, so the development is based on reverse engineering. None if the index formats support is finalized. That made it hard to integrate them into one consistent API. That is why I decided to write my own index support, and as I wanted to avoid inventing yet another way of storing records in pages and similar things, I used SDBM. It comes with Perl, so you already have it, and it's proven and it works. Now, SDBM is a module that aims at other task than to do supporting indexes for a dbf. But equality tests are fast with it and I have creted a structure in each index file to enable "walk" though the index file. VERSION
1.02 AVAILABLE FROM
http://www.adelton.com/perl/DBD-XBase/ AUTHOR
(c) 2001--2011 Jan Pazdziora. All rights reserved. This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.4 2011-03-03 XBase::SDBM(3pm)
All times are GMT -4. The time now is 04:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy