命令如下:
-
[root@aws ~]# mkdir jiaguwen
-
[root@aws ~]# touch jiaguwen.txt jiaguwen2.txt jiaguwen3.txt
-
[root@aws ~]# cd jiaguwen
-
[root@aws jiaguwen]# ls
-
jiaguwen2.txt jiaguwen3.txt jiaguwen.txt
-
[root@aws jiaguwen]# ls*.txt| xargs -n1 -i{} mv{} {}_bak
-
[root@aws jiaguwen]# ls
-
jiaguwen2.txt_bak jiaguwen3.txt_bak jiaguwen.txt_bak
网页标题:Linux小技巧,一条命令实现查找文件和改名
文章起源:
http://cdweb.net/article/pdsics.html