[svlug] Caps on my Cisco Networking CD

Scott daoem at geocities.com
Fri Nov 6 10:09:25 PST 1998


Kewl!!  Ok thanks to all of you for your great scripts/programs.  I first copied
the files to my hard drive and converted them but when I heard Seths suggestion I
tried the mount thing and it works fine off the cd now.  I guess it was just
mounting as some other filesystem.  Well now I have to go change my cdrom mounting
batch thingys.  Thanks a lot.  BTW: Anyone have some kind of a program that could
run in the back ground and when ever you mention cdrom in a command it would
automatically the cdrom?  it would mount it of course after you pressed enter at
teh end off the command.
--Scott--




Seth David Schoen wrote:

> Scott writes:
>
> > Hello.  I am taking this Cisco Networking class at school and I have a
> > cd w/ all the lessons.  We use netscape to view these.  The only problem
> > is that when we made the cd we made it in windows95 and i guess it made
> > all of the filenames capitals.  Now whenever i click on the a link it
> > wont find it because the directory and the file names are all caps
> > instead of lower case.  There are like thousands of files on this cd.
> > Literally i mean more than 5,000 files on this cd.  Lots of images and
> > movies and html pages.  There is no way that I am going to be able to
> > change this all to lowercase.  I know that there are some smart fellows
> > out there that are just wizzes at perl or c.  If any of you could write
> > me a short little app that would change these filenames to lowercase
> > that would be just swell if it isnt too much to ask.  If there is a
> > program already out there that does that and you know the name of it
> > please tell me that would be just great.  Thanks for your time.
>
> There are lot of options for writing scripts to do this, but an appropriate
> place to start looking for solutions is in the origin of the problem: how
> the filesystem is mounted.  Take a look at the man page for mount(8).
>
> You'll see that you can
>
> mount -t iso9660 -o check=relaxed /dev/cdrom /mnt/cdrom
>
> Look around further in mount(8) and you'll see other information relevant
> to how filesystems are interpreted upon being mounted.
>
> Here's your script, incidentally: run these two "find" commands.
>
> PREFIX=/cool-place
> find /source -type d -exec withlcase $PREFIX/'{}' mkdir -p \;
> find /source -type f -exec withlcase $PREFIX/'{}' cp '{}' \;
>
> The "withlcase" script is:
>
> #!/bin/sh
> # withlcase: execute $2, ... with lowercase($1) as argument
>
> FILE=`echo "$1" | tr [A-Z] [a-z]`
> shift
> $* $FILE
>
> This does work (in my little test), but should be unnecessary.  You get a
> /cool-place/source tree containing the original /source, but with lower-case
> filenames.  (There are some problems, like if two file have the same name,
> or if there were symlinks in the original, but for your situation, this
> should also work.)
>
> --
>    Seth David Schoen L&S '01 (undeclared) / schoen at uclink4.berkeley.edu
> He said, "This is what the king who will reign over you will do."  And they
> said, "Nay, but we will have a king over us, that we also may be like all the
> nations." (1 Sam 8)  http://ishmael.geecs.org/~sigma/   http://www.loyalty.org/
>
> --
> echo "unsubscribe svlug" | mail majordomo at svlug.org
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ to unsubscribe


--
echo "unsubscribe svlug" | mail majordomo at svlug.org
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ to unsubscribe



More information about the svlug mailing list