#!/bin/bash for file in `ls -1 /root/a | grep ".*.c"` { mv /root/a/$file /root/b } ls -lS /root/b
#!/bin/bashecho -n "请输入目标目录位置:"read dirfor i in `ls | grep -E "*\.c"`domv $i $dirdonels -lS $dir
楼上是高手啊 膜拜 我忍不住ctrl C了一下