wget ile bir sürü dosya indirmiş ve sonunda dosya isimlerinin aşağıdaki gibi olduğunu gördüğünüzde,
-rw------- 1 root root 4571582464 Nov 14 13:16 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-11.iso?_auth_=1480368811_ade7d8e4dd0e74beaa67461363924e25
-rw------- 1 root root 4593364992 Nov 14 14:49 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-12.iso?_auth_=1480368811_1bf520f9916df4ea7521fad7f7a0a3e3
-rw------- 1 root root 4589133824 Nov 14 13:31 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-13.iso?_auth_=1480368811_756792cb9a21ad72c35b9e540902bcf3
-rw------- 1 root root 4591882240 Nov 14 13:16 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-14.iso?_auth_=1480368811_58548585e50051fcf1306ea5f5c8ec80
-rw------- 1 root root 4574281728 Nov 14 14:49 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-15.iso?_auth_=1480368811_f9be8cd22982c3ebd49bc5fc23ec2805
-rw------- 1 root root 4595855360 Nov 14 13:31 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-16.iso?_auth_=1480368811_367d04ac31306a579faf1accda37e233
-rw------- 1 root root 4593598464 Nov 14 13:16 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-17.iso?_auth_=1480368811_cc1628e46d8447e5039ead7905c7e1f4
-rw------- 1 root root 4595111936 Nov 14 13:16 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-18.iso?_auth_=1480368811_e5c3c3433993e25c11b4b5d2ce692ac5
-rw------- 1 root root 4588482560 Nov 14 14:49 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-19.iso?_auth_=1480368811_e2038e3d446d61a7bf6b9265ef300d26
-rw------- 1 root root 1875603456 Nov 14 14:46 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-20.iso?_auth_=1480368811_c4aef7cc195efcfd2059840e6af63ffb
bu isimleri nasıl düzenlerim dediğinizde, basit bir shell script ;
# for name in `ls`; do echo $name; nn=`echo $name|cut -d\? -f1`;echo $nn; mv "$name" $nn;done
yardımımıza yetişir. Yukarıdaki satırda dosya isimleri ? karekterinden önceki bölüm olarak düzeltiliyor. ls ile kontrol ettiğimizde;
-rw------- 1 root root 4571582464 Nov 14 13:16 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-11.iso
-rw------- 1 root root 4593364992 Nov 14 14:49 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-12.iso
-rw------- 1 root root 4589133824 Nov 14 13:31 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-13.iso
-rw------- 1 root root 4591882240 Nov 14 13:16 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-14.iso
-rw------- 1 root root 4574281728 Nov 14 14:49 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-15.iso
-rw------- 1 root root 4595855360 Nov 14 13:31 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-16.iso
-rw------- 1 root root 4593598464 Nov 14 13:16 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-17.iso
-rw------- 1 root root 4595111936 Nov 14 13:16 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-18.iso
-rw------- 1 root root 4588482560 Nov 14 14:49 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-19.iso
-rw------- 1 root root 1875603456 Nov 14 14:46 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-20.iso
-rw------- 1 root root 4571582464 Nov 14 13:16 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-11.iso?_auth_=1480368811_ade7d8e4dd0e74beaa67461363924e25
-rw------- 1 root root 4593364992 Nov 14 14:49 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-12.iso?_auth_=1480368811_1bf520f9916df4ea7521fad7f7a0a3e3
-rw------- 1 root root 4589133824 Nov 14 13:31 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-13.iso?_auth_=1480368811_756792cb9a21ad72c35b9e540902bcf3
-rw------- 1 root root 4591882240 Nov 14 13:16 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-14.iso?_auth_=1480368811_58548585e50051fcf1306ea5f5c8ec80
-rw------- 1 root root 4574281728 Nov 14 14:49 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-15.iso?_auth_=1480368811_f9be8cd22982c3ebd49bc5fc23ec2805
-rw------- 1 root root 4595855360 Nov 14 13:31 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-16.iso?_auth_=1480368811_367d04ac31306a579faf1accda37e233
-rw------- 1 root root 4593598464 Nov 14 13:16 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-17.iso?_auth_=1480368811_cc1628e46d8447e5039ead7905c7e1f4
-rw------- 1 root root 4595111936 Nov 14 13:16 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-18.iso?_auth_=1480368811_e5c3c3433993e25c11b4b5d2ce692ac5
-rw------- 1 root root 4588482560 Nov 14 14:49 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-19.iso?_auth_=1480368811_e2038e3d446d61a7bf6b9265ef300d26
-rw------- 1 root root 1875603456 Nov 14 14:46 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-20.iso?_auth_=1480368811_c4aef7cc195efcfd2059840e6af63ffb
bu isimleri nasıl düzenlerim dediğinizde, basit bir shell script ;
# for name in `ls`; do echo $name; nn=`echo $name|cut -d\? -f1`;echo $nn; mv "$name" $nn;done
yardımımıza yetişir. Yukarıdaki satırda dosya isimleri ? karekterinden önceki bölüm olarak düzeltiliyor. ls ile kontrol ettiğimizde;
-rw------- 1 root root 4571582464 Nov 14 13:16 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-11.iso
-rw------- 1 root root 4593364992 Nov 14 14:49 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-12.iso
-rw------- 1 root root 4589133824 Nov 14 13:31 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-13.iso
-rw------- 1 root root 4591882240 Nov 14 13:16 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-14.iso
-rw------- 1 root root 4574281728 Nov 14 14:49 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-15.iso
-rw------- 1 root root 4595855360 Nov 14 13:31 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-16.iso
-rw------- 1 root root 4593598464 Nov 14 13:16 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-17.iso
-rw------- 1 root root 4595111936 Nov 14 13:16 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-18.iso
-rw------- 1 root root 4588482560 Nov 14 14:49 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-19.iso
-rw------- 1 root root 1875603456 Nov 14 14:46 sat-6-isos--rhel-6-server-x86_64-2016-11-11T10.35-20.iso
görüyoruz.
Yorumlar
Yorum Gönder