rename v. script

liu.guo-hua(刘国华) liu.guo-hua at yellowsheepriver.com
Thu May 19 05:13:28 UTC 2005


rename * *.html

----- Original Message ----- 
From: "THUFIR HAWAT" <hawat.thufir at gmail.com>
To: "fedora" <fedora-list at redhat.com>
Sent: Thursday, May 19, 2005 1:01 PM
Subject: rename v. script


> given:
> 
> bash-3.00$ ls -al
> total 984
> drwxr-xr-x   2 thufir thufir  4096 May 16 02:18 .
> drwx------  15 thufir thufir  4096 May 16 02:18 ..
> -rw-r--r--   1 thufir thufir 12354 May 14 22:30 1151154
> -rw-r--r--   1 thufir thufir 12955 May 14 22:16 1199229
> -rw-r--r--   1 thufir thufir 13639 May 14 22:22 1238181
> -rw-r--r--   1 thufir thufir 13996 May 14 22:24 1268816
> -rw-r--r--   1 thufir thufir 12176 May 14 22:37 1276032
> ...
> 
> and then:
> 
> bash-3.00$ mv 1151154 1151154.html
> bash-3.00$ mv 1199229 1199229.html
> bash-3.00$ mv 1238181 1238181.html
> 
> each file can be changed.  however, there are many files and that is
> very tedious.  can the above three commands (or 50, or 100) be written
> with a single rename command?
> 
> thanks,
> 
> Thufir
> 
> -- 
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list




More information about the fedora-list mailing list