1、修改文件名mv
#表达的意思是:文件夹内有很多cosubc*文件,现在需要去掉co
find ./ -name "cosubc*" | while read id; do mv $id ${id/cosubc/subc}; done
2、bet 剥头皮
#剥头皮
find ./ -name "*.nii" | while read id; do bet ${id}.nii.gz ../T1_1to210nii_co/${id}_brain.nii.gz -f 0.2; done
#去掉文件中生成的nii字符串
find ./ -name "*.gz" | while read id; do mv $id ${id/.nii_brain/_brain}; done
#将文件名中的-改成_
find ./ -name "*-*" | while read id; do mv $id ${id/-/_}; done
网友评论