Filename conversion

John Vetterli jvetterli-zC6tqtfhjqE at public.gmane.org
Sun Apr 11 20:20:47 UTC 2004


On Sun, 11 Apr 2004, John Wildberger wrote:
> I imported from an XP OS a number of files into Linux. These files have names
> like "Set1 001.png" with a space beteen the Set1 and 001.png. These are
> picture files and can be displayed by by GIMP without a hitch inspite of the
> space char.
> However, anything else I want to do with these files fails due to the presence
> of the space. Any individual file can be renamed without problems, thereby
> eliminating the space char. However, this is quite cumbersome if there are a
> great number of files.

man rename

There seems to be more than one flavour of rename out there.  On my
Slackware system, to change the spaces to underscores, "rename ' ' _ *"
would do the job.  On my debian system, it would be "rename 's/ /_/' *".
So check your man page.

JV
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list