首页 > 应用开发 > IT综合 > 获得某个目录下的所有目录以及子目录
#!/usr/bin/sh
cd $1
function getPath
{
for file in *
do
if test -d $file ; then
cd $file
echo "mkdir " `pwd` >> ./create_path.sh
getPath
cd ..
fi
done
}
echo "now is getting dirctory structure! ......"
getPath
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/12059843/viewspace-1003496/ ,如需转载,请注明出处,否则将追究法律责任。