日期:2014-05-16  浏览次数:20770 次

谁能给我解释下哦?
所达到的效果,我知道,但是,我不明白这些命令的具体用法

将文件名中的空格替换成字符"_"
renmae 's/ /_/g' *
这里的s和g分别表示什么意思哦?

转换文件大小写
rename 'y/a-z/A-Z/' *
这里的y表示什么意思?

将所有的.mp3文件移入给定的目录
find path -type f -name  "*.mp3" -exec mv {} target_dir \;
这里的path是不是查找路径的含义?
target_dir是不是要去把这些路径替换为target_dir?

------解决方案--------------------
引用
这里的path是不是查找路径的含义?

是的

引用
target_dir是不是要去把这些路径替换为target_dir?
 
不是
find /etc -type f -name "*.mp3" -exec mv {} /tmp \;
意思是把/etc下面找到的符合条件的文件移动到/tmp下面