[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Renaming multiple extensions-file on unix..



"Miranda, Joel Louie M" wrote:
> 
> Hello,
> 
> I have this html pages and I just want to rename them all into *.php
> Anyone have any ideas? Doing this in just one command? Or Just a script?

Hi,

you could install "mmv" (multiple mv) which is close to perfect for
these things.
  One other way would be to run something like:

	for f in *html; do mv $f ${f//.html/.php}; done

which should work if there's not to many files.  Note that I think it
requires bash though.  And of course, it renames _all_ html files, so be
carefull.  Perhaps even prepend the 'mv' with an echo so you can "debug"
what will be done before doing so.

Best regards,
	Emil


> 
> Thanks,
> Louie
> 
> --
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: