[root@DB-Server kerry]# cat >"test.txt " it is only for test! [1]+ Stopped cat > "test.txt " [root@DB-Server kerry]# cat >"tes t.txt" it is only for test too! [2]+ Stopped cat > "tes t.txt" [root@DB-Server kerry]# ls test.txt ls: test.txt: No such file or directory [root@DB-Server kerry]# ls test test~ test1.py test.py test.sh test.txt [root@DB-Server kerry]# ls test.txt\ \ \ \ test.txt [root@DB-Server kerry]# ls tes test~ test1.py test.py test.sh tes t.txt test.txt
[root@DB-Server kerry]# find . -type f -name "* *" -print ./test.txt ./tes t.txt
find . -type f -name "* *" -print | while read name; do na=$(echo $name | tr ' ' '_') if [[ $name != $na ]]; then mv "$name" "$na" fi done
[root@DB-Server kerry]# rm -rf * [root@DB-Server kerry]# cat >"test.txt " 12 [root@DB-Server kerry]# cat >"tes t.txt" 12 [root@DB-Server kerry]# find . -type f -name "* *" -print ./test.txt ./tes t.txt [root@DB-Server kerry]# for file in *; do mv "$file" `echo $file | tr ' ' '_'` ; done [root@DB-Server kerry]# find . -type f -name "* *" -print [root@DB-Server kerry]# ls -lrt total 8 -rw-r--r-- 1 root root 0 Nov 13 10:04 test.txt -rw-r--r-- 1 root root 0 Nov 13 10:04 tes_t.txt
[root@DB-Server kerry]# rm -rf * [root@DB-Server kerry]# cat >"test.txt " 12 [root@DB-Server kerry]# cat >"tes t.txt" 12 [root@DB-Server kerry]# find . -type f -name "* *" -print ./test.txt ./tes t.txt [root@DB-Server kerry]# for i in *' '*; do mv "$i" `echo $i | sed -e 's/ /_/g'`; done [root@DB-Server kerry]# find . -type f -name "* *" -print [root@DB-Server kerry]# ls -lrt total 8 -rw-r--r-- 1 root root 0 Nov 13 09:29 test.txt -rw-r--r-- 1 root root 0 Nov 13 09:29 tes_t.txt [root@DB-Server kerry]# [root@DB-Server kerry]#
[root@DB-Server kerry]# rm -rf *; [root@DB-Server kerry]# cat >"test.txt " 123 [root@DB-Server kerry]# for file in *; do echo "$file"; echo "$file" | wc -m ; done; test.txt 13 [root@DB-Server kerry]# for file in *; do echo $file; echo $file | wc -m ; done; test.txt 9 [root@DB-Server kerry]#
[root@DB-Server kerry]# rm -rf * [root@DB-Server kerry]# cat >"test.txt " 123456 [root@DB-Server kerry]# find . -type f -name "* *" -print ./test.txt [root@DB-Server kerry]# for file in *; do mv "$file" `echo "$file" | tr ' ' '\n'` ; done [root@DB-Server kerry]# find . -type f -name "* *" -print [root@DB-Server kerry]# ls test.txt test.txt [root@DB-Server kerry]#
[root@DB-Server kerry]# [root@DB-Server kerry]# rm -rf * [root@DB-Server kerry]# cat >"test.txt " 123456 [root@DB-Server kerry]# for file in *' '*; do mv "$file" `echo "$file" | sed -e 's/ /n/g'`; done [root@DB-Server kerry]# find . -type f -name "* *" -print
[root@DB-Server kerry]# [root@DB-Server kerry]# rm -rf * [root@DB-Server kerry]# cat >"tes t.txt" 123456 [root@DB-Server kerry]# for file in *; do mv "$file" `echo "$file" | tr ' ' '_'` ; done [root@DB-Server kerry]# find . -type f -name "* *" -print [root@DB-Server kerry]# ls -lrt total 8 -rw-r--r-- 1 root root 7 Nov 13 16:00 tes_t.txt [root@DB-Server kerry]# [root@DB-Server kerry]# rm -rf * [root@DB-Server kerry]# cat >"tes t.txt" 123456 [root@DB-Server kerry]# cat >"test.txt " 654321 [root@DB-Server kerry]# find . -type f -name "* *" -print ./test.txt ./tes t.txt [root@DB-Server kerry]# for file in *; do mv "$file" `echo "$file" | tr ' ' '_'` ; done [root@DB-Server kerry]# find . -type f -name "* *" -print [root@DB-Server kerry]# ls -lrt total 12 -rw-r--r-- 1 root root 0 Nov 13 15:59 tes_t.txt -rw-r--r-- 1 root root 7 Nov 13 15:59 test.txt____
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有