From owner-freebsd-questions@FreeBSD.ORG Sun Sep 18 08:57:35 2005 Return-Path: X-Original-To: freebsd-questions@FreeBSD.ORG 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 6E3C616A41F for ; Sun, 18 Sep 2005 08:57:35 +0000 (GMT) (envelope-from parv@pair.com) Received: from mta11.adelphia.net (mta11.adelphia.net [68.168.78.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id D4B2D43D46 for ; Sun, 18 Sep 2005 08:57:34 +0000 (GMT) (envelope-from parv@pair.com) Received: from default.chvlva.adelphia.net ([69.160.76.67]) by mta11.adelphia.net (InterMail vM.6.01.04.01 201-2131-118-101-20041129) with ESMTP id <20050918085733.UFNK27017.mta11.adelphia.net@default.chvlva.adelphia.net>; Sun, 18 Sep 2005 04:57:33 -0400 Received: by default.chvlva.adelphia.net (Postfix, from userid 1000) id 30AF3B554; Sun, 18 Sep 2005 04:57:35 -0400 (EDT) Date: Sun, 18 Sep 2005 04:57:35 -0400 From: Parv To: Gary Kline Message-ID: <20050918085735.GA31527@holestein.holy.cow> Mail-Followup-To: Gary Kline , FreeBSD Mailing List References: <20050917232747.GA76966@thought.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050917232747.GA76966@thought.org> Cc: FreeBSD Mailing List Subject: Re: how to rename a file with "!", "?", and other strange chars? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2005 08:57:35 -0000 in message <20050917232747.GA76966@thought.org>, wrote Gary Kline thusly... > > I scarfed up a slew of php files that are around 100 bytes in > strlen and with "\ " and other non-shell-friendly bytes. Is there > a way to use perl to chop off the first N bytes? > > For example, a file many be named 00001\ 00002xyz\?00003=Test.php. > What's the most logical way to perl this file to "Test.php? Perl: http://perlmonks.org/index.pl?node_id=303814 http://perlmonks.org/index.pl?node_id=277174 Other: http://groups.google.com/groups?q=%22file+name%22+unusal+OR+weird+characters+group%3Acomp.unix.* http://groups.google.com/groups?q=rename+unusal+OR+weird+characters+group%3Acomp.unix.* - Parv --