LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-18-2007, 07:12 AM   #1
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Rep: Reputation: 45
weird looking files that can only be seen through SAMBA, but not through linux itself


Hi All,

I have a Linux server with several RAID1 disks using ext3. In each RAID set I have several folders that contain several files.

I noticed recently that when I view some of these folders through SAMBA through Windows, I see weird looking but working files such as COKZP1~6.AVI, LT128W~0.AVI, etc..

The problem is that I cannot see them from the Linux machine itself through the use of bash (ls -lah, find *.avi), mc, konqueror, rox, etc.. It's as if they don't exist. I think they were caused by power cuts where some of my files disappeared. Nevertheless, I managed to recover my missing files from previous backups. I just would like to know how on earth to find these ... `lost` or `hidden` files and remove them from my system.

I tried running fsck but it didn't find anything wrong (well.. nothing bad was outputted from fsck..).

Thanks.
 
Old 10-18-2007, 07:42 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
Since the files work, my first thought is the perhaps the files do exist, but Samba is presenting the wrong filenames to the Windows machine.

In particular, those filenames look a lot like vfat 8.3 filenames.

As far as Windows is concerned, all files have a name consisting of up to eight characters, followed by a dot, followed by up to three characters. They also have a second name, called a "long filename" which is what the user actually sees. Normally the "8.3" name can be worked out by taking the first six letters or numbers of the long filename, then adding a tilde (~), then adding a unique number (usually 1), then a dot, then the first three characters after the first dot in the long filename. So if you had a file called "Hello World.text" then SAMBA would also give it the name "HELLOW~1.TEX". 8.3 filenames are always lowercase.

Unlike vfat or iso8859-1, Ext3 does not use 8.3 filenames, so they must be being introduced by Samba in some way. Which leads me to suspect that the files exist on the disk with some other filename.

I would try running these command from BASH:
Code:
find . -iname 'COKZ*.avi'
Code:
find . -iname 'LZ*128*.avi'
and seeing if that can find your files.

Another option would be to try and find MD5 checksums for the files in Windows, then run
Code:
md5sum *
to produce MD5 checksums for the files in Linux. If you can find two files with the same checksum then (in all probability) these are the same files.

If that doesn't help, perhaps you could post a list of what you see with ls -1a, compared with what you see from Windows?

Yours,

Robert J Lee.
 
Old 10-18-2007, 08:09 AM   #3
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Original Poster
Rep: Reputation: 45
Quote:
Originally Posted by rjlee View Post
Another option would be to try and find MD5 checksums for the files in Windows, then run
Code:
md5sum *
to produce MD5 checksums for the files in Linux. If you can find two files with the same checksum then (in all probability) these are the same files.
Thank you Robert. This was really confusing me and the above section solved my problem. It turns out that some of my files had question marks in their file names, such as,

London Vacation [2007x04] - ?.avi

They appeared normally on Linux hence why I never pinpointed the problem. However, It wasn't recognised properly under Windows+Samba. I just renamed them and got rid of the question mark, and the problem is gone.
 
  


Reply



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
Problems sharing files between XP and Linux via Samba bmccorm2 Linux - Networking 5 08-28-2006 07:35 PM
copying files from linux to window with samba walterbyrd Linux - Networking 5 09-23-2005 03:36 AM
Weird problem copying files with Samba... iammike Linux - Networking 2 04-12-2005 05:19 PM
samba/Can't see Linux files in XP Network Places RogueWave Linux - Security 2 01-24-2004 04:59 PM
Win98 can't access Linux files, via Samba cornell Linux - General 8 07-19-2001 01:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:36 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
Open Source Consulting | Domain Registration