Remove files by dates


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Remove files by dates
# 1  
Old 10-24-2000
Question

I've tried every way possible to remove files by date and nothing seems to work. Does anyone have an idea how to remove files by dates? Thanks in advance....
# 2  
Old 10-25-2000
The find() command will do this. There are many flags which will find a command based on date, time, modification, etc. Then you use the -exec switch to remove the file. Try 'man find' on your system and locate the switch that is right for your needs.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Remove dates from file names

Hi, I'm using a shell script. I have extracted current date files to a directory1 and the date should be removed on both sides of a CSV file. FYI... I'm looking to remove the date from the file name and not inside the CSV file. Directory1 2017-07-12_gmr_tag_log_20170711.csv... (0 Replies)
Discussion started by: shivamayam
0 Replies

2. Shell Programming and Scripting

awk to combine all matching dates and remove non-matching

Using the awk below I am able to combine all the matching dates in $1, but I can not seem to remove the non-matching from the file. Thank you :). file 20161109104500.0+0000,x,5631 20161109104500.0+0000,y,2 20161109104500.0+0000,z,2 20161109104500.0+0000,a,4117... (3 Replies)
Discussion started by: cmccabe
3 Replies

3. UNIX for Dummies Questions & Answers

Need to Move files of different dates

Hi, Currently I'm moving the files based on date like below. "mv *20150901* backup_folder" - Limitation: can move only 1 day files to backup folder. I want to move the files of different dates like 20150901,02, 03, 04..... Is there any single command to do it. Thanks in advance!! (2 Replies)
Discussion started by: prakashs1218
2 Replies

4. Shell Programming and Scripting

Deleting the files between particular dates

Hi Please help me for the below task. In my home directory if I run ls -l command, it lists all the files, here I want to delete files created from January 2014 to Aug 2014...but I need to keep the files which are created after September 01 2014. Thanks Siva (3 Replies)
Discussion started by: kumar85shiv
3 Replies

5. Shell Programming and Scripting

Files between two dates in UNIX

Hi Team, I need to connect to a prod server and need to get the files which falls between two dates. I should not create ant files on that machine. I am using korn shell. Your help is very much appreciated. Vinay (13 Replies)
Discussion started by: gvkumar25
13 Replies

6. 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

7. AIX

Copy files for particular dates

Hi, I need to copy particular date files from one directory to another. For example, I have thousands of files in /home/usr From this I need to copy only particular date files (each date contains thousand number of files) to some directory of another server. Could anyone please help me... (3 Replies)
Discussion started by: teddy2882
3 Replies

8. Shell Programming and Scripting

script with dates to gzip and remove

Good morning all! I am new to programming and trying to learn; please be patient. I am wanting to write a script that takes the current date and gzip 5 days or older, then remove 10 days or older. This is the directory I want to work in; this is what it looks like ... (2 Replies)
Discussion started by: bigben1220
2 Replies

9. UNIX for Dummies Questions & Answers

files between any two given dates

Can any one help me in getting all the files between any two given dates.. (8 Replies)
Discussion started by: thanuman
8 Replies

10. UNIX for Dummies Questions & Answers

Files and dates

Hello all. I am trying to do a file listing on a particular directory by date. I need to list the files and their directories that have a timestamp between Dec-1-2006 and Jan-1-2007. Any help would be greatly appreciated. (1 Reply)
Discussion started by: mastachef
1 Replies
Login or Register to Ask a Question