Linux小技巧,一条命令实现查找文件和改名
命令如下:
-
[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://dzwzjz.com/article/pdsics.html