[nSLUG] Thumbdrive filenames (Was: An unusual Ubuntu logon problem)

Joel Maxuel j.maxuel at gmail.com
Sat Aug 22 18:15:43 ADT 2015

vfat is Windows' long file name solution to fat16, so the behaviour noticed
is as expected (filenames are not case sensitive, has no idea on how do
deal with symlinks).  Same goes for fat32, ntfs and (t)exfat.  There are
two ideas I can think of to get around this limitation:

1. Format the stick ext2 (or ext4 without journaling)
2. tar the archive to the stick (tar cvvs foo/ > /media/stick/foo.tar) and
then be forced to view the backup in an archiving tool.

All depends on how you want to share the backup.  If the stick only deals
with linux machines (and often in the console), might as well go with door
#1.  Otherwise, if you still want to stick to play nice with Windows or
other OSes, door #2 is the way to go.

Hope this helps.

Joel Maxuel

"One should strive to achieve, not sit in bitter regret."
 - Ronan Harris / Mark Jackson

On Sat, Aug 22, 2015 at 5:45 PM, Mike Spencer <mspencer at tallships.ca> wrote:

> Digressing from the Ubuntu login matter...
> Frank Geitzler wrote [snipped for brevity]:
> > Incidentally, I copied the entire '/home/jill' folder to a USB
> > drive, using the command "sudo cp -r /home/jill
> > /media/nnnn-nnnn/jill" The copy produced several error messages....
> >
> > cp: cannot create symbolic link
> >
> > cp: Invalid argument
> >
> > cp: cannot create regular file
> I just noticed that, tying to do a backup to a USB thumb drive with cp(1),
> the results are not as expected. I though I was being clever to add a
> thumb drive backup to my usual backup to a conventional HD on a 2nd
> machine.
>   + Case is preserved in some filnames but not in others.
>   + Case is not distinguished so foo and FOO appear to be the same.
> bogus% grep /mnt/usb /etc/fstab
>   /dev/sda1      /mnt/usb       vfat       noauto,user,rw,exec,sync
> bogus% cd /mnt/usb
> bogus% echo foo > FOO
> bogus% echo foo > foo
>    foo: File exists.
> I don't have the error messages here from my attempted backup of ~/ to
> the USB device but several of them were similar to above where
> filename and FILENAME both exist on my Linux HD.
> In addition numerous files with upper case names were copied with the
> name in lower case while other were copied correctly.
> I never noticed this before.  There must be am established fix or
> workaround for this.
> Is it wrong to mount the thumb drive as "vfat"?  Do you have to
> reformat the drive to a Linux fs?  Is that even possible?  Something
> else?
> I don't care about preserving the very few symlinks in ~/* but the
> filename case has to be preserved.  What am I missing?
> (Not apropos to Frank's original Ubuntu question but relevant to his
> most recent post/question.)
> - Mike
> --
> Michael Spencer                  Nova Scotia, Canada       .~.
>                                                            /V\
> mspencer at tallships.ca                                     /( )\
> http://home.tallships.ca/mspencer/                        ^^-^^
> _______________________________________________
> nSLUG mailing list
> nSLUG at nslug.ns.ca
> http://nslug.ns.ca/mailman/listinfo/nslug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nslug.ns.ca/pipermail/nslug/attachments/20150822/cff9f32a/attachment.html>

More information about the nSLUG mailing list