LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-29-2007, 08:44 PM   #1
gridman
LQ Newbie
 
Registered: Oct 2005
Posts: 2

Rep: Reputation: 0
USB Flash Drive is case insensitive


I would like to use rsync to my USB flash drive but case sensitivity is important. I have tried using several mount options and haven't come up with the right combination yet. Does anyone have a way that can have filenames in upper and lower case on a USB drive?

Here is what I have tried in fstab:

/dev/disk/by-path/pci-0000:00:1d.0-usb-0:1:1.0-scsi-0:0:0:0-part1 /mnt/usb auto noauto,rw,users,exec,async,utf8=true,umask=0002,hotplug 0 0

Yeah, the device is odd, but I got tired of changing /dev/disk/sda? or /dev/disk/hda? when devices got reordered with upgrades of disk drivers.

The one option I thought would do the trick was utf8=true, but it did not fix this problem.

Thanks.
 
Old 12-29-2007, 10:54 PM   #2
kzutter
Member
 
Registered: Nov 2007
Location: Carson City, NV USA
Distribution: Various, but always Debian based
Posts: 70

Rep: Reputation: 15
Which filesystem?

The type of file system really matters here.
Your fstab is telling mount to auto detect the file system, so we cannot tell here what it is.

The fat file system has some specific settings for filename case.
man mount will tell you more than you need to know.

Code:
ken@u2:~$ man mount
 
Old 12-30-2007, 12:37 AM   #3
gridman
LQ Newbie
 
Registered: Oct 2005
Posts: 2

Original Poster
Rep: Reputation: 0
Are you implying here, that all I need to do is a mkfs (either ext3 or xfs) on the USB drive and it will become character sensitive? I know windows is pretty archaic, but is there a way to make a file system be liked by both windows (case insensitive) and Linux (case sensitive) and filenames are recognized by both? Just checking here for something in addition to Samba.
 
Old 01-02-2008, 03:00 PM   #4
kzutter
Member
 
Registered: Nov 2007
Location: Carson City, NV USA
Distribution: Various, but always Debian based
Posts: 70

Rep: Reputation: 15
Windows will never differentiate between the filenames 'foo' and 'FOO'. They are functionally the same. They cannot exist in the same directory on a windows file system, period.

One way to transport mixed case Linux filenames on a windows file system would be to wrap them in a tarball. However, untarring the files onto a windows file system would be problematic.

Yes, you can place a Linux file system such as ext3 on a flash disk. You will then have the case discrimination that you want. However you will also lose Windows compatibility.

Perhaps if you were more descriptive in the details of what you are trying to achieve, we can make some suggestions.
 
Old 01-02-2008, 03:10 PM   #5
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 60
Quote:
Originally Posted by kzutter View Post
Windows will never differentiate between the filenames 'foo' and 'FOO'. They are functionally the same. They cannot exist in the same directory on a windows file system, period.
That's simply not true. While FAT is case-ignorant, NTFS isn't. And given that Linux handles NTFS nicely these days (through the ntfs-3g driver), the OP might want to format his flashdrive in NTFS to be accessible from Linux and WIndows.
 
Old 01-02-2008, 06:44 PM   #6
kzutter
Member
 
Registered: Nov 2007
Location: Carson City, NV USA
Distribution: Various, but always Debian based
Posts: 70

Rep: Reputation: 15
Quote:
Originally Posted by Uncle_Theodore View Post
That's simply not true. While FAT is case-ignorant, NTFS isn't.
I respectfully maintain that it IS true.
Please follow along with this demonstration from my NTFS formatted Windows Laptop.

Code:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Ken.NNLC-LAPTOP>mkdir foo

C:\Documents and Settings\Ken.NNLC-LAPTOP>cd foo

C:\Documents and Settings\Ken.NNLC-LAPTOP\foo>echo bar >> bar.txt

C:\Documents and Settings\Ken.NNLC-LAPTOP\foo>dir
 Volume in drive C has no label.
 Volume Serial Number is 0000-5A8C

 Directory of C:\Documents and Settings\Ken.NNLC-LAPTOP\foo

01/02/2008  03:30 PM    <DIR>          .
01/02/2008  03:30 PM    <DIR>          ..
01/02/2008  03:30 PM                 6 bar.txt
               1 File(s)              6 bytes
               2 Dir(s)   3,552,722,944 bytes free

C:\Documents and Settings\Ken.NNLC-LAPTOP\foo>type bar.txt
bar

C:\Documents and Settings\Ken.NNLC-LAPTOP\foo>echo BAR >> BAR.TXT

C:\Documents and Settings\Ken.NNLC-LAPTOP\foo>dir
 Volume in drive C has no label.
 Volume Serial Number is 0000-5A8C

 Directory of C:\Documents and Settings\Ken.NNLC-LAPTOP\foo

01/02/2008  03:30 PM    <DIR>          .
01/02/2008  03:30 PM    <DIR>          ..
01/02/2008  03:31 PM                12 bar.txt
               1 File(s)             12 bytes
               2 Dir(s)   3,552,722,944 bytes free

C:\Documents and Settings\Ken.NNLC-LAPTOP\foo>type BAR.TXT
bar
BAR

C:\Documents and Settings\Ken.NNLC-LAPTOP\foo>echo foobar FOO.TXT

C:\Documents and Settings\Ken.NNLC-LAPTOP\foo>dir
 Volume in drive C has no label.
 Volume Serial Number is 0000-5A8C

 Directory of C:\Documents and Settings\Ken.NNLC-LAPTOP\foo

01/02/2008  03:35 PM    <DIR>          .
01/02/2008  03:35 PM    <DIR>          ..
01/02/2008  03:31 PM                12 bar.txt
01/02/2008  03:34 PM                 9 FOO.TXT
               2 File(s)             21 bytes
               2 Dir(s)   3,552,788,480 bytes free

C:\Documents and Settings\Ken.NNLC-LAPTOP\foo>ren FOO.TXT BAR.TXT
A duplicate file name exists, or the file
cannot be found.
 
Old 01-02-2008, 06:48 PM   #7
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 60
OK, I'm rebooting into Windows now. Lessee...

I'm inside the dreded Vista now. So...
Yes. You're right! The darn thing can NOT have files foo.txt and FOO.TXT in the same directory! They can't be created from either the command line, nor from the Explorer! Wow... Windows is even more stupid, than I thought it was...

Sorry, I didn't believe you at first. You win.

Last edited by Uncle_Theodore; 01-02-2008 at 07:03 PM.
 
Old 01-02-2008, 07:10 PM   #8
kzutter
Member
 
Registered: Nov 2007
Location: Carson City, NV USA
Distribution: Various, but always Debian based
Posts: 70

Rep: Reputation: 15
Thumbs up

Quote:
Originally Posted by Uncle_Theodore View Post
Wow... Windows is even more stupid, than I thought it was...
Agreed!

Quote:
Originally Posted by Uncle_Theodore View Post
... You win.
Actually, we BOTH win!

I love a healthy debate. Thanks for double checking me.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to search in VI wih case insensitive lordofring Programming 7 11-16-2011 09:11 AM
Case-insensitive CVS? sundialsvcs Programming 2 06-25-2006 11:01 AM
SuSE's less(1) is always case insensitive: how to disable? wirawan0 SUSE / openSUSE 1 01-25-2006 01:10 PM
case insensitive search command ColKurtz Linux - Newbie 4 01-20-2005 08:02 AM
case-insensitive auto-complete gSalsero Programming 3 06-08-2004 08:33 AM


All times are GMT -5. The time now is 08:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration