80

I have a DVD ROM with some teaching resources on it (Headway Beginner's English teaching teacher's DVD). When I look at the DVD from a Ubuntu machine, I see one set of files (which includes a setup-linux file among other things, although that doesn't work).

When I view the same DVD from a Windows machine, I see a different set of files, including a setup-windows.exe file.

Neither machine sees all the files, but there are some common to both.

My questions are:

  1. How does this work?
  2. How can I see the all the files when using Ubuntu?

Edit: this is not due to files being "hidden" when viewed in a file manager, lower level things like "ls -a" do not reveal the missing files.

Edit 2: I'm using Ubuntu 18.04 LTS

2
  • You haven't said which Ubuntu release you are using, but in nautilus (or 'Files' the file manager for gnome) if you go to icon-view mode and click on the menu you can click "Show Hidden Files" and you should see all files. If in details (or list) mode the option is somewhat hidden (on my 19.04 box; sorry I don't use nautilus normally). Windows by default uses a fs (file-system) flag to hide files, where as *nix (Ubuntu, any GNU/Linux, apple or unix) use a '.' as the first character of filename to make a file 'hidden'.
    – guiverc
    Jan 18, 2019 at 9:03
  • 2
    This is not a hidden files thing - using ls -a in Linux does not show the missing files. And neither does "Show hidden files" in Windows explorer. Jan 18, 2019 at 9:18

2 Answers 2

111

I'm not sure this is the correct answer, but maybe it'll provide you with details that will help you.

It could be because MS-Windows and Unix use different file systems on DVD - even on the same DVD. Files on an optical medium are usually arranged using a file system protocol specified in the ISO 9660 standard (also see notes at the end).

But the standard allows for extensions, and Microsoft has designed their own extension to the standard called "Joliet" that allows Microsoft Windows compatible operating systems to read different file names with more features (longer names and support Unicode) than the standard ISO 9660 file system allows.

For Unix-style operating systems (such as Linux), another extension called "Rock Ridge" was developed, to allow even longer file names, Unix-style permissions, and a few other things.

It is very common to have both Rock Ridge and Joliet extensions on the same optical medium, but it could be that the creator of that DVD used these extensions in a clever way to only have the MS-Windows related files show in the Joliet part of the system and only have the Linux specific files show in the Rock Ridge part of the system. The isoinfo program discussed in this stackexchange answer might provide more information.

Notes:

As mentioned in the discussion in the comments, while a lot of media are still authored in ISO 9660 and its extensions where the kinds of tricks discussed in the OP can happen, ISO 9660 is obsolete and modern media should be authored using UDF (ISO 13346) which is a Universal Disk Format and only allows a single view of the entire file system - so such tricks will probably not be possible on a UDF authored disk.

13
  • 27
    Thanks, that was enough - isoinfo dev=/dev/dvd -J -ls shows the missing files in Linux. Jan 18, 2019 at 10:01
  • 25
    Pretty good answer, but one important detail I see missing is the --norock and --nojoliet mount options you can use on Linux to decide which of the three tree layouts you want to see.
    – kasperd
    Jan 18, 2019 at 14:21
  • 8
    Wow that's ... actually surprisingly elegant. Jan 18, 2019 at 17:17
  • 4
    Some tools such as mkisofs actually allow you to specify how to generate those. The "Examples" section at the linked man page shows how you can create an ISO that has a file named README, but will appear with different contents depending on what system you're using to view the CD. To quote the man page: "There are probably all sorts of strange results possible with combinations of the hide options..."
    – Herohtar
    Jan 18, 2019 at 19:08
  • 3
    I'm happy that there is mention of UDF in the comments, but I'm not sure its relevant to the discussion - if the file system on the OP's DVD was a universal format then you won't be able to get different views in Windows and Linux, as far as I understand.
    – Guss
    Jan 19, 2019 at 12:45
0

Very probably the "rockridge" (unix) and "joliet" (microsoft) tables map the bare iso9660 file names differently. They both involve a "mapping" in each directory that basically says which actual iso files (8+dot+3 characters) should be seen as which longer name. So each file actually has 2 names, one limited to 8+3 characters, and one that's not.

On rockridge, this mapping is an actual file that gets added to each directory, iirc named "TRANS.TBL" or something. On joliet, it's an extremely ugly and stupid hack where a "directory entry" isn't an actual file, but is reserved for this purpose.

1
  • Oh i forgot to add: windows only supports joliet (no surprise there) while linux supports both (also no surprise there) although in linux, and most other unix systems, rockridge takes precedence by default. There is however mount options to disable one or the other, or both. If you disable both, then you'll just see the short 8.3 filenames, like you would for ex. in DOS or in windows 3.x and prior. Depending which file manager and desktop environment you use, there might be a "user friendly" way to do that without typing commands :)
    – delt
    Jan 22, 2019 at 23:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .