具体的信息:http://baike.baidu.com/link?url=55bDj3cihNXMVF2wqUQI4XF_cC3Cya-yn9TpZlKvT9jE336GKejspWpipPnMICHC87tYVKIMDLCXoFyqpaXhKilp8gNMmSSuAxaABfmznz_
如果只有文件的话。进到根目录find . -mindepth 2 -type f -exec mv {} ./ \}
find . -type d -exec -rf rm {} \
注意:根目录不是 系统根目录啊,放5层目录的最顶层目录
保险一点就用下面的
#!/bin/bash
#filename:mvf.sh
if [ $# -ne 1 ]
then
echo "Usage: mvf.sh <path>"
else
cd $1
main_path=`pwd`
for sub_path in `find $main_path -maxdepth 1 -type d | grep -v $main_path$`
do
cd $sub_path
find -type f -exec mv {} $main_path/ \
find -type b -exec mv {} $main_path/ \
find -type l -exec mv {} $main_path/ \
find -type p -exec mv {} $main_path/ \
find -type l -exec mv {} $main_path/ \
find -type s -exec mv {} $main_path/ \
cd $main_path
rm -rf $sub_path
done
fi
#end of mvf.sh
链接: https://pan.baidu.com/s/1jIiUC7dhk2hKvyE0buI80A
?pwd=wxrr 提取码: wxrr
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)