Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 285
  • Last Modified:

change a group of file names

Hi,
Is there any Unix command which can change all files whose names ended with .a to  .b ?
(mv  *.a  *.b doesn't work)

Thanks
0
tian
Asked:
tian
1 Solution
 
ahoffmannCommented:
ls *.a | sed -e 's/\(.*\)\.a/mv \1.a \1.b/' | sh
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now