查看当前目录下的文件: find . -type f 查看当前目录下的文件夹: find . -type d 如果文件file1不为空: if [ -s file1 ];then echo "file1 不为空" fi #!/bin/sh for f in `find ./testdir -type f`; do if [ -s $f ];then echo $f is not empty. ec
for i in *;do sed -ie 's/_test2/_test3/g' $i; sed -ie 's/_type2/_type3/g' $i; done 539down voteaccepted 1. Replacing all occurrences of one string with another in all files in the current directory: These are for cases where you know that the directo