Sabi ni Fooler noong Fri, Feb 20, 2009 at 3:11 PM:
> as like i said... if you cant find in google.. you can find it here in plug 
> :->

To clarify, Google did give me links to utilities, but they were for
Windows. Wasn't about to boot into Windows just to run those utils.

> the commands below regardless they are uppercase or lowercase or
> combination of both... it will convert all to lowercase both for
> directories and filenames...
>
> 1. cd to your starting directory
> 2. execute the command below to convert first all the directories into
> lowercase..
>
> for x in `find * -type d`; do f=`echo $x|tr [A-Z] [a-z]`; mv $x
> $f+danny; mv $f+danny $f; done
>
> 3. then execute the command below to convert all the filenames into 
> lowercase...
>
> for x in `find * -type f`; do f=`echo $x|tr [A-Z] [a-z]`; mv $x
> $f+danny; mv $f+danny $f; done
>
> "mv" command cannot move or rename a file with the same source and
> destination values (eg. the file or directory is already in lowercase
> like "mv abc abc" produced an error)  thus i append the string
> "+danny" to circumvent that problem...

Thanks, bro, that did the job. You also get points for putting my name
in the script :D Thanks also to Michael for his effort, even if it
didn't work maybe because of the difference in Solaris usage of xargs.
I suppose I could read the xargs man page and look for the counterpart
of --xmaxlines=1 but I wasn't in learning mode or mood :) Maybe some
other time.
-- 
Daniel O. Escasa
independent IT consultant and writer
contributor, Free Software Magazine (http://www.freesoftwaremagazine.com)
personal blog at http://descasa.i.ph
Twitter page at http://www.twitter.com/silverlokk
If we choose being kind over being right, we will be right every time.
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
http://lists.linux.org.ph/mailman/listinfo/plug
Searchable Archives: http://archives.free.net.ph

Reply via email to