清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
#!/bin/bash FROM_DIR=Study TO_DIR=Study-SRC echo "Searching..." file_list=(`find $FROM_DIR/ -name "*.[hc]" -o -name "*.cpp" | xargs`) total=${#file_list[*]} index=1 for fn in ${file_list[*]} do dir=$TO_DIR/$(dirname $fn) if [ -d $dir ]; then mkdir -p $dir fi echo "[$index/$total] copy $fn --> $dir" cp -f $fn $dir index=$(($index + 1)) done echo "Done !"