由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - 如何把一个目录下的文件名全部改成小写?
相关主题
问一个列目录的问题how would you do this?
如何只列出文件有关Unix shell script的问题
question[转载] How to list the files with specific permission?
[转载] Shell高手看过来。shell programming problems
怎样才能只列出一个目录下面的文件? How do i get a list of all computers?
请高人指点replace a string in all files under a directory?
请问如何在一个目录下查询所有以某文件名开头的文How to find a file in the deep children directory?
怎么把文件所在的目录名加到文件名后面Re: 如何用grep查找子目录下的文件?--stop!
相关话题的讨论汇总
话题: afile话题: mv话题: 小写话题: echo话题: tolower
进入Unix版参与讨论
1 (共1页)
k*x
发帖数: 8
1
有什么快捷的方法么?
B**z
发帖数: 153
2
for afile in *;do
if echo $afile |grep [A-Z] >/dev/null;then
mv $afile `echo $afile|tr "[:upper:]" "[:lower:]"`
fi
done

【在 k*x 的大作中提到】
: 有什么快捷的方法么?
p*a
发帖数: 592
3
ls -1 | awk '{print ("\"")($0)("\"")(" ")("\"")(tolower($0))("\"")}' |
xargs -n2 mv

【在 k*x 的大作中提到】
: 有什么快捷的方法么?
1 (共1页)
进入Unix版参与讨论
相关主题
Re: 如何用grep查找子目录下的文件?--stop!怎样才能只列出一个目录下面的文件?
Re: 如何用grep查找子目录下的文件?请高人指点
sed? awk? or mak a program?请问如何在一个目录下查询所有以某文件名开头的文
how to grep a string in all sub-dirs?怎么把文件所在的目录名加到文件名后面
问一个列目录的问题how would you do this?
如何只列出文件有关Unix shell script的问题
question[转载] How to list the files with specific permission?
[转载] Shell高手看过来。shell programming problems
相关话题的讨论汇总
话题: afile话题: mv话题: 小写话题: echo话题: tolower