Email address obfuscation in effect -- please
click here to turn it off.
[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
On Wed, 2 Oct 2002, Stephen Montgomery-Smith wrote:
> I know Jon King will totally disapprove of how I do it, but if
> all the files are in one directory, I do it like this:
Well, I guess if you can't inspire respect, than fear or paranoia
will have to do. :-/
Seriously, I don't see anything wrong with this as long as there's
only one directory and you know that nobody gives you a maliciously
file name. (You're pretty unhappy if there's a file "FOO;\ RM\ -RF
*".)
If you've got a hairy, bushy directory tree, than the ftp method or
maybe this together with "find" would be the way to go.
> cd directory
> ls | perl -lne 'print "mv $_ ",lc($_)'
> Look it over to check that it will do what you want, then
> ls | perl -lne 'print "mv $_ ",lc($_)' | sh
OK, if you were doing this millions of times, then maybe all of
those "mv"s would get you down, in which case you can do it all
perl-internal using stuff like opendir(). Would I do that?
Probably not.
jking
--
To unsubscribe, go to http://mlug.missouri.edu/members/edit.php
Archives are available at http://mlug.missouri.edu/list-archives/