From owner-freebsd-questions@FreeBSD.ORG Tue May 27 06:18:25 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4639C37B404 for ; Tue, 27 May 2003 06:18:25 -0700 (PDT) Received: from thunder.trej.net (as3-3-6.orby.s.bonet.se [217.215.33.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id 82E7543FCB for ; Tue, 27 May 2003 06:18:23 -0700 (PDT) (envelope-from joachim@dagerot.nu) Received: from mailgw.trej.net (localhost [127.0.0.1])h4RDIDs21928 for ; Tue, 27 May 2003 15:18:13 +0200 Message-Id: <200305271318.h4RDIDs21928@thunder.trej.net> Date: Tue, 27 May 2003 15:18:13 +0200 Content-Transfer-Encoding: 8bit From: Joachim Dagerot Content-Type: text/plain; charset=iso-8859-1 MIME-Version: 1.0 To: freebsd-questions@freebsd.org User-Agent: IMHO/0.98.3t (Webmail for Roxen) 3j-viruscheck: Found to be clean Subject: shell programming - how to write a script that renames files after their last moddate? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2003 13:18:25 -0000 This is certainly not freeBSD specific and probably I'm annoying someone for being off-topic but please be patient and hint me on where to find good resources in shell-programming. I could use some help in writing a script that renames all files in a directory tree to the files last modified date, example usage: > daterename "Img_" *.jpg the command above will rename all *.jpg files to "Imag_".jpg