From: Glynn Clements <glynn@gclements.plus.com>
To: zyserman@fcaglp.unlp.edu.ar
Cc: linux-admin@vger.kernel.org
Subject: Re: renaming multiple files
Date: Tue, 23 Nov 2004 01:30:40 +0000 [thread overview]
Message-ID: <16802.37568.605213.224819@cerise.gclements.plus.com> (raw)
In-Reply-To: <41A20C74.4050709@fcaglp.unlp.edu.ar>
Fabio Zyserman wrote:
> I have some files in a directory, called
> prefix-file1
> prefix-file2
> etc
>
> I want to rename them to
> file1
> file2
> etc
>
> How can I do it with a bash command?
for file in prefix-* ; do
mv "$file" "${file##prefix-}"
done
Various utilities exist to perform this task, e.g. rename, mmv, but
none are standard (rename is from util-linux, so it's likely to exist
on most Linux systems, but not other Unices).
--
Glynn Clements <glynn@gclements.plus.com>
next prev parent reply other threads:[~2004-11-23 1:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-22 15:57 renaming multiple files Fabio Zyserman
2004-11-22 16:42 ` harry_b
2004-11-22 18:03 ` urgrue
[not found] ` <2005107FDBE38F10D101E700@192.168.1.247>
2004-11-22 18:30 ` Helge Pettersen
2004-11-23 1:30 ` Glynn Clements [this message]
2004-12-08 1:05 ` Jeff Woods
2004-12-09 19:09 ` Glynn Clements
2004-12-09 21:02 ` Jeff Woods
2004-12-10 15:17 ` Glynn Clements
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16802.37568.605213.224819@cerise.gclements.plus.com \
--to=glynn@gclements.plus.com \
--cc=linux-admin@vger.kernel.org \
--cc=zyserman@fcaglp.unlp.edu.ar \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).