Results 1 to 6 of 6
Thread: Deleting Files Between 2 Dates
-
01-04-2008, 05:24 AM #1Newbie
- Join Date
- Jan 2008
- Posts
- 17
Deleting Files Between 2 Dates
hi
i have about 10.000 files in my hard drive
i want to delete the files e.g. from 1 jan 2007 to 1 mar 2007
how i can do that from SSH if that can happen ??
-
01-04-2008, 05:37 AM #2Web Hosting Master
- Join Date
- Apr 2003
- Location
- San Jose, CA.
- Posts
- 1,624
$ touch -d "Jan 1 2007" file.start
$ touch -d "Mar 1 2007" file.end
$ find / -daystart -newer file.start \! -daystart -newer file.end -exec rm {} \;
You should probably test that excluding the -exec rm {} \;
first as I didn't...Daved @ Lightwave Networking, LLC.
AS1426 https:/www.lightwave.net
Primary Bandwidth: EGIHosting (NLayer, NTT, HE, Cogent)
Xen PV VPS Hosting
-
01-04-2008, 05:46 AM #3Newbie
- Join Date
- Jan 2008
- Posts
- 17
amm good other ideas ?
-
01-04-2008, 06:23 AM #4Web Hosting Master
- Join Date
- Apr 2003
- Location
- San Jose, CA.
- Posts
- 1,624
What's wrong with that?
-
01-04-2008, 06:41 AM #5Newbie
- Join Date
- Jan 2008
- Posts
- 17
i couldn't understand that
-
01-04-2008, 07:13 AM #6Disabled
- Join Date
- Dec 2002
- Location
- chica go go
- Posts
- 11,876
Those are commands, you're supposed to type them into your ssh window.