From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1JUOF0-0001JK-8i for garchives@archives.gentoo.org; Wed, 27 Feb 2008 15:30:42 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D7393E0772; Wed, 27 Feb 2008 15:30:39 +0000 (UTC) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.169]) by pigeon.gentoo.org (Postfix) with ESMTP id 7BA7AE0772 for ; Wed, 27 Feb 2008 15:30:39 +0000 (UTC) Received: by ug-out-1314.google.com with SMTP id j3so353094ugf.49 for ; Wed, 27 Feb 2008 07:30:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type:content-transfer-encoding; bh=s6pI3yuMzuK01TDUo0nJVvO+mkM6XCVjrnbUuDmccoo=; b=W9vx10s+9dhVvgNtiKsXhUWt+9CuD1196ot3Ht67c7oCzSk9fvPG+XnC5HuSzI1prDPt47uoJP5wo1jlC4XmKM4rAel0r4xvxPTpjux+7H/DtoOo+jMad1e93/ziBTPmb1lh3dIlEOfLgEElmhH3+Bss/hxJfi0fd2nYOKwA7Wg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type:content-transfer-encoding; b=lT1i0b7SBMorGxlkQ1p5GgybBgZz+vKZwjm+N7kTK3ygM1/ThMjEKMQheQAqC+kcyVgWz2/w1HckP9L/t0Vgl1+eYyHx+gRJvpo6OOIfBrIsBCd/Bda+SNMpqN6bmqONwqfy9xgAEMv8Z6CX1S3tGUI6BMe8HNoPGfv2y0qiHoo= Received: by 10.67.29.20 with SMTP id g20mr1211706ugj.54.1204126238869; Wed, 27 Feb 2008 07:30:38 -0800 (PST) Received: from ilievnet.com ( [84.21.204.1]) by mx.google.com with ESMTPS id k30sm1708160ugc.53.2008.02.27.07.30.36 (version=SSLv3 cipher=OTHER); Wed, 27 Feb 2008 07:30:36 -0800 (PST) Date: Wed, 27 Feb 2008 17:30:34 +0200 From: Daniel Iliev To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Renaming tons of files Message-ID: <20080227173034.1db8e0e2@ilievnet.com> In-Reply-To: <8e6453010802270712y44a05a9cw2be22a9c8262f2a0@mail.gmail.com> References: <8e6453010802270712y44a05a9cw2be22a9c8262f2a0@mail.gmail.com> X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.5; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: 6667d016-7355-4bca-ad28-3ac5eca35b25 X-Archives-Hash: 9b897b523aa199158ec090bf164bc678 On Wed, 27 Feb 2008 16:12:41 +0100 "Amar Cosic" wrote: > Hello > > I have issue where I have something.TXT something.PDF and I need to > rename them to something.txt something.pdf (so with lower cases) . Is > there any easy way to do this (command,script? ) > > Thanks > Use at your own risk. Make a backup before try. 1) rename ".PDF" ".pdf" *.PDF rename ".TXT" ".txt" *.TXT 2) find . -iname "*.pdf" -o -iname "*.txt" | while read -r oldname do newname=$(echo "${fname}" | tr [[:upper:]] [[:lower:]]) mv "${oldname}" "${newname}" done -- Best regards, Daniel -- gentoo-user@lists.gentoo.org mailing list