[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting filenames to lowercase in a directory



On Monday 24 June 2002 02:00 am, you wrote:
> On Sunday 23 June 2002 11:39 pm, you wrote:
> > Is there an easy way to convert all of the filenames in a given
> > directory to lowercase?
>
> find . -type f|while read f; do f2=`echo $f|tr a-z a-z`;mv '$f' '$f2';done

Doh!
Try this instead if you don't want to traipse through all of the 
subdirectories...

 find . -type f -maxdepth 1|while read f; do f2=`echo $f|tr a-z a-z`;mv '$f' 
'$f2';done

Mike808/
-- 
() Join the ASCII ribbon campaign against HTML email and Microsoft-specific
/\ attachments. If I wanted to read HTML, I would have visited your website!
Support open standards.


-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.