[svlug] copying special files to VFAT
Rafael Skodlar
raffi at linwin.com
Mon Nov 12 11:25:02 PST 2001
On Sat, Nov 10, 2001 at 12:29:19PM -0800, J C Lawrence wrote:
> On Sat, 10 Nov 2001 08:48:26 -0800
> Marc MERLIN <marc_news at valinux.com> wrote:
>
> > I can write a perl script to study the filenames and rename them
> > before the copy, but I was hoping for something a bit simpler than
> > that, like a mount option for the vfat partition that discards
> > forbidden characters (I looked in the options, but none seemed to
> > do that).
Using:
Red Hat Linux release 7.1 (Seawolf)
Kernel 2.4.2-2smp on a 2-processor i686
VMware 3.0 with W2000
In order to use floppy drive under Linux I have to suspend it's connection
in VMware. That's easy to do.
I did the following test on my system a few moments ago:
[] vi stupid:windows:file:names
[] mcopy stupid\:windows\:file\:names a:
Long file name "stupid:windows:file:names" contains illegal character(s).
a)utorename A)utorename-all r)ename R)ename-all
s)kip S)kip-all q)uit (aArRsSq): a
[] mdir a:
Volume in drive A has no label
Volume Serial Number is 2415-16DD
Directory for A:/
STUPID~1 24 11-12-2001 11:05 stupid_windows_file_names-1
I connected floppy drive back to VMware/W2000 and use it's GUI to read the
floppy drive. The name of the file appears exactly as expected, the way
man pages for mtools and mcopy describe it:
* Illegal characters are replaced by underscores. The
illegal characters are ;+=[]',\"*\\<>/?:|.
"stupid_windows_file_names-1" is what I see in windog browser.
I do not have VFAT or such partition on my hard drive (why waste space) to
make the same test with it but assume that it would work the same way it
does with the floppy disk.
Life with Linux is almost easy.
>
> For a slightly similar problem I do the following.
>
> First script the copy tool ala:
>
> mpycp: cp ${2} ${1}`echo ${2} | echo $dir | sed s./.\\\!.g`
>
> Then:
>
> pattern=${1}
> path=${2}
> find / -name ${pattern} | xargs -n1 mycp ${path}
>
> Not great, but works. You could also just use ZOO archives instead.
>
> --
> J C Lawrence
> ---------(*) Satan, oscillate my metallic sonatas.
> claw at kanga.nu He lived as a devil, eh?
> http://www.kanga.nu/~claw/ Evil is a name of a foeman, as I live.
--
Rafael
# Unix is mature OS.
# MS Windows is still in diapers and they smell badly.
More information about the svlug
mailing list