> 
> I run it but it has error. 
> 
> sed 's/^dir-192\.168/dir-10\.0/'`
> sed: read error on dir-192.168.0.31: Is a directory
> 


Was there an problem with Frank's response from earlier?

rename 192.168 10.0 dir*

It is a nice simple solution. You don't have to loop, or use extra
commands, just copy and paste that one command to your machine, and all
directories will be renamed. I just did it on 1000 directories, and it
took 0.052 seconds:

[EMAIL PROTECTED] test]$ ls -ld dir-192.168.0.* | wc -l
1000
[EMAIL PROTECTED] test]$ time rename 192.168 10.0 dir*


real    0m0.052s
user    0m0.012s
sys     0m0.040s
[EMAIL PROTECTED] test]$ ls -ld dir-10.0.0.* | wc -l
1000

Mike
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Reply via email to