From owner-freebsd-questions@FreeBSD.ORG Wed Sep 3 19:13:55 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 823E216A4BF for ; Wed, 3 Sep 2003 19:13:55 -0700 (PDT) Received: from remt20.cluster1.charter.net (remt20.cluster1.charter.net [209.225.8.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4861C43FDD for ; Wed, 3 Sep 2003 19:13:54 -0700 (PDT) (envelope-from chowse@charter.net) Received: from [66.168.145.25] (HELO moe) by remt20.cluster1.charter.net (CommuniGate Pro SMTP 4.0.6) with ESMTP id 145595223; Wed, 03 Sep 2003 22:13:52 -0400 From: "Charles Howse" To: , "'Jonas'" Date: Wed, 3 Sep 2003 21:13:45 -0500 Message-ID: <000001c3728a$2bdb9510$04fea8c0@moe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 In-Reply-To: <20030904020628.GE50130@plewe.is.tsukuba.ac.jp> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 cc: freebsd-questions@freebsd.org Subject: RE: How do I change the extensions on a slew of files 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: Thu, 04 Sep 2003 02:13:55 -0000 > > Hello Know-It-Alls, > >=20 > > If I have a directory with a whole slew of files with the same file > > extension, for example: > >=20 > > 1-1-1.inc > > 1-1-2.inc > > 1-1-3.inc > > etc. > >=20 > > What command can I use to change the file extension - but=20 > keep the file > > name the same - in one swell swoop? The equivalent command=20 > in Windows > > would be: > >=20 > > C:\>ren *.inc *.htm=20 > >=20 >=20 > The shortest answer is probably: >=20 > portinstall mmv; mmv "*.inc" =3D1.htm Another option might be: # Ls | > while read file ; do > mv $file.inc $file.htm > done #