Re: rename many files together
On Thu, Apr 16, 2009 at 11:30 AM, Maurice Guerrier <guelo509@yahoo.com> wrote:
> Hi,
>
> I have 17 files that I want to rename at the same times. I would like to
> give to the new name, the original name.old
>
> For exemple : document, presentation and reading.txt I want to rename then
> like this : document.old, presentation.old and reading.txt.old.
> How can I do this in one command ?
>
> Help me please.
% for f in document presentation reading.txt; do mv $f ${f}.old; done
You are probably better off using a glob pattern if you need to
operate on many files with similar names.
/M
--
Magnus Therning (OpenPGP: 0xAB4DFBA4)
magnus@therning.org Jabber: magnus@therning.org
http://therning.org/magnus identi.ca|twitter: magthe
Reply to: