deleting files for a particular month


 
Thread Tools Search this Thread
Operating Systems HP-UX deleting files for a particular month
# 1  
Old 06-23-2008
deleting files for a particular month

Hi,
I want to delete files of a particular month in a particular directory. Please tell me a script for this so that it will search a particular kind of file in that directory and delete them.I am using HP-UX.
# 2  
Old 06-23-2008
the find command and its various options may be useful for you
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Get last month files

Hi All, How to get last month files. Ex : 1st Jan i have to get Dec 31 days files and on Feb 1st i have to get Jan 31 days files and on Mar 1st i have to get Feb 28 days files. Below are the example files with date and timestamp. aaa.txt.timestamp aaa.txt.timestamp aaa.txt.timestamp Please... (7 Replies)
Discussion started by: kiranparsha
7 Replies

2. Shell Programming and Scripting

Need last month files after 10th of every month

Hi, I need all file names in a folder which has date >= 10th of last month, Example : files in folder AUTO_F1_20140610.TXT BUTO_F1_20140616.TXT CUTO_F1_20140603.TXT FA_AUTO_06012014.TXT LA_AUTO_06112014.TXT MA_AUTO_06212014.TXT ZA_AUTO_06232014.TXT Output: AUTO_F1_20140610.TXT... (9 Replies)
Discussion started by: nani1984
9 Replies

3. Shell Programming and Scripting

How to add decimal month to some month in sql, php, perl, bash, sh?

Hello, i`m looking for some way to add to some date an partial number of months, for example to 2015y 02m 27d + 2,54m i need to write this script in php or bash or sh or mysql or perl in normal time o unix time i`m asking or there are any simple way to add partial number of month to some... (14 Replies)
Discussion started by: bacarrdy
14 Replies

4. UNIX for Advanced & Expert Users

Find all files other than first two files dates & last file date for month

Hi All, I need to find all files other than first two files dates & last file date for month and month/year wise list. lets say there are following files in directory Mar 19 2012 c.txt Mar 19 2012 cc.txt Mar 21 2012 d.txt Mar 22 2012 f.txt Mar 24 2012 h.txt Mar 25 2012 w.txt Feb 12... (16 Replies)
Discussion started by: Makarand Dodmis
16 Replies

5. Shell Programming and Scripting

Script to counting a specific word in a logfile on each day of this month, last month etc

Hello All, I am trying to come up with a shell script to count a specific word in a logfile on each day of this month, last month and the month before. I need to produce this report and email it to customer. Any ideas would be appreciated! (5 Replies)
Discussion started by: pnara2
5 Replies

6. UNIX for Dummies Questions & Answers

print previous month (current month minus 1) with Solaris date and ksh

Hi folks month=`date +%m`gives current month Howto print previous month (current month minus 1) with Solaris date and ksh (7 Replies)
Discussion started by: slashdotweenie
7 Replies

7. Shell Programming and Scripting

Removing 2 month old files

I am trying to delete 2 month old file with date extension yyyymmdd, How can i get a 2 month old month and year? (16 Replies)
Discussion started by: shehzad_m
16 Replies

8. Shell Programming and Scripting

Find all files by month

Hi, I am trying to do achieving of files by months. find /test -name \*.* -mtime +30 will give me the result of all modified files after 30 days. But lets say i want to list all files that is modified in last months... what is the command to do it? Thanks! (13 Replies)
Discussion started by: maldini
13 Replies

9. Shell Programming and Scripting

Deleting file with last modified for 1 month

Hello... Any body, how to delete the files where last modified for 1 month, would you give some example. Sorry, im very newbie in scripting. Thanks. (4 Replies)
Discussion started by: blesets
4 Replies

10. UNIX for Dummies Questions & Answers

Deleting files automatically, the condition in the month of creation

Hi all, I'm newby in this great forum. I'm working as an Intelligent Networks Administrator for a Fixed telephony company. I want to write a script shell that helps me in my daily/weekly tasks. A voice switch sends every hour a statistic file to a log directory. By now, i've got more than 5000... (4 Replies)
Discussion started by: FabioALex
4 Replies
Login or Register to Ask a Question