|
From: Rene R. <re...@gr...> - 2003-08-14 13:56:27
|
This is an example usage of find:
It will find all files modified more than 30 days ago which are larger
than 5000KB and list them using ls long format (ls -l)
find /home/rene/ -mtime +30 -size +5000k -type f -exec ls -l {} \;
If you want to delete files you can replace "ls -l" with "rm -f" but be
careful. You don't get any warnings.
I usually test with "ls -l" before deleting. It gives an idea od what
I'm deleting.
You can also spice this up by only searching for files which end in
".avi" ".mpg" ".mov" and so on.
Throw a bunch of these in a script file and use cron to execute it every
night if you don't want to do it manually.
Cheers
Rene
On Wed, 2003-08-13 at 21:54, James W. Beauchamp wrote:
> Hi:
> I have an administrative question concerning BOBS. Does someone have some
> sort of script that periodically runs on the BOBS backup area and deletes
> all files over X days old? It appears that something like this would be
> nice since it keeps your hard disk from just filling up. Any chance of
> something like this making it into the project? (self serving Feature
> Request from a non-coder ;))
>
> If I'm missing something let me know.
>
> Thanks
>
> James
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
> _______________________________________________
> Bobs-devel mailing list
> Bob...@li...
> https://lists.sourceforge.net/lists/listinfo/bobs-devel
--
Rene Rask <re...@gr...>
|