imoing

导航

 

2013年10月8日

摘要: 所需实现功能:把dir目录中所有的链接的路径进行修改,格式为 /data/root/path/to/file -> /newdata/root/path/tofile ,即只修改最顶上两级的路径实现思路:下面这些要写成一个方法,方便递归for file in `ls $dir`{ file="$dir/$file" if ( -h $file ) { //如果是符号链接 sourcefile=readlink $file //符号链接所指向的路径 sourcefile=`echo $sourcefile | sed "s, preg,replace,g&qu 阅读全文
posted @ 2013-10-08 14:12 艾莫明 阅读(513) 评论(0) 推荐(0) 编辑