From owner-freebsd-questions@FreeBSD.ORG Mon May 20 12:34:27 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8FCFA4FF for ; Mon, 20 May 2013 12:34:27 +0000 (UTC) (envelope-from leslie@eskk.nu) Received: from mx1.bjare.net (mx1.bjare.net [212.31.160.3]) by mx1.freebsd.org (Postfix) with ESMTP id 507C6656 for ; Mon, 20 May 2013 12:34:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mx1.bjare.net (Postfix) with ESMTP id 0D85C5E543 for ; Mon, 20 May 2013 14:34:19 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mx1.bjare.net X-Spam-Flag: NO X-Spam-Score: -0.966 X-Spam-Level: X-Spam-Status: No, score=-0.966 tagged_above=-999 required=5 tests=[AWL=0.032, BAYES_00=-2.599, RCVD_IN_PBL=0.905, RDNS_DYNAMIC=0.1, SPF_SOFTFAIL=0.596] Received: from mx1.bjare.net ([127.0.0.1]) by localhost (mx1.bjare.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 7P9EOe+kmJN1 for ; Mon, 20 May 2013 14:34:14 +0200 (CEST) X-BN-MX1: ja X-BN-MailInfo: BjareNet Received: from bljbsd01.no-ip.org (c224-156-70-80.bjare.net [80.70.156.224]) by mx1.bjare.net (Postfix) with ESMTP id 200565E4C9 for ; Mon, 20 May 2013 14:34:10 +0200 (CEST) Message-ID: <519A1843.3070808@eskk.nu> Date: Mon, 20 May 2013 14:34:11 +0200 From: Leslie Jensen User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130516 Thunderbird/17.0.6 MIME-Version: 1.0 To: FreeBSD Questions Subject: Delete files with time stamp on Samba Server Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2013 12:34:27 -0000 I have a remote Samba Server where Windows machines place backup files once a day. The format is backup_2013-05-03_13.45.44_.zip Before the Windows client places the file it removes the file from the day before. In turn I do a backup of the backup files once every week(Friday) to another directory. This directory will eventually fill up and I need to make a check and remove the oldest file maybe once a week before the new file is copied, or put in other words I never want more than 4 files to be in this directory. My scripting skills are not at the level where I can figure this out, so I'll appreciate suggestions on how to solve this in the correct way. Thanks :-) /Leslie