From owner-freebsd-questions@FreeBSD.ORG Thu Jan 10 05:30:02 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3F3DC657 for ; Thu, 10 Jan 2013 05:30:02 +0000 (UTC) (envelope-from odhiambo@gmail.com) Received: from mail-oa0-f52.google.com (mail-oa0-f52.google.com [209.85.219.52]) by mx1.freebsd.org (Postfix) with ESMTP id 12B312D9 for ; Thu, 10 Jan 2013 05:30:01 +0000 (UTC) Received: by mail-oa0-f52.google.com with SMTP id o6so175499oag.39 for ; Wed, 09 Jan 2013 21:29:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=YWp6YjlmXSURYFa6N90a5uqdtGfht0xabxkCZpEzsGI=; b=hPG3ENIBV7kWkDWHPE6HNE6gbQvZH2yfS3IYZ/ek+ubP/8rz9VLcKY2HLsrhSPNfRM MmAyVAhC6rBxxvzrWWv8FzUCHyK76v1hE6bRRJ00UKYEZM+duyslAktm8SvGG9qM81C3 XHRpccDs5yh5EM4c1cvCIXWqHiysiBgRvLDrWnTi6htQfyv8Pr9Qx2o0qFR+nME55+vm 5LQAY0iH/YikpqOPgCdS1imnv3dfKc7wVLckiOCy5Ov+TIMWWK9puyN+cIDXZR/VdMUb ATigUR2oOypYTZaH++FgdA0wqpde6PQDZSFkHVpRawThzJ9odxleALBczD2a+9ap0LBw XAlQ== Received: by 10.182.159.98 with SMTP id xb2mr11966498obb.35.1357795795302; Wed, 09 Jan 2013 21:29:55 -0800 (PST) MIME-Version: 1.0 Received: by 10.76.122.197 with HTTP; Wed, 9 Jan 2013 21:29:15 -0800 (PST) From: Odhiambo Washington Date: Thu, 10 Jan 2013 08:29:15 +0300 Message-ID: Subject: Renaming files To: User Questions Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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: Thu, 10 Jan 2013 05:30:02 -0000 I have several files in this format: rw-r--r-- 1 johndoe johndoe 20085 Jan 9 19:30 1357744249.26989.mbox:2, -rw-r--r-- 1 johndoe johndoe 24419 Jan 9 19:30 1357744250.26989.mbox:2, -rw-r--r-- 1 johndoe johndoe 418 Jan 9 19:30 1357744251.26989.mbox:2, -rw-r--r-- 1 johndoe johndoe 418 Jan 9 19:30 1357744252.26989.mbox:2, -rw-r--r-- 1 johndoe johndoe 78426 Jan 9 19:30 1357744254.26989.mbox:2, -rw-r--r-- 1 johndoe johndoe 2561 Jan 9 19:30 1357744255.26989.mbox:2, -rw-r--r-- 1 johndoe johndoe 6971 Jan 9 19:30 1357744257.26989.mbox:2, -rw-r--r-- 1 johndoe johndoe 11270 Jan 9 19:30 1357744259.26989.mbox:2, I'd like to rename them so that the filenames are in the format below: -rw------- 1 johndoe johndoe 197702 Jan 10 03:00 1357776052.V803I33939aM83469.mail.domain.me.net:2, -rw------- 1 johndoe johndoe 14579 Jan 10 03:31 1357777873.V803I33939bM614733.mail.domain.me.net:2, -rw------- 1 johndoe johndoe 29212 Jan 10 03:46 1357778798.V803I33939cM995892.mail.domain.me.net:2, -rw------- 1 johndoe johndoe 2834 Jan 10 04:30 1357781421.V803I33939dM597872.mail.domain.me.net:2, -rw------- 1 johndoe johndoe 10593 Jan 10 06:18 1357787890.V803I33939eM865700.mail.domain.me.net:2, -rw------- 1 johndoe johndoe 43565 Jan 10 07:10 1357791044.V803I33939fM193189.mail.domain.me.net:2, -rw------- 1 johndoe johndoe 15492 Jan 10 07:42 1357792926.V803I3393a0M601349.mail.domain.me.net:2, The first part of the filename is unique, so I just need to substitute 26989.mbox:2, with V803I33939aM83469.mail.domain.me.net:2, hoping there will be no clash:( -- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254733744121/+254722743223 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ I can't hear you -- I'm using the scrambler.