'ls -l' in Linux VM & 'dir /a' in Windows host are different(?)

Discussions related to using VirtualBox on Windows hosts.
Post Reply
abcdefgh
Posts: 77
Joined: 22. Jul 2018, 03:29
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Linux Mint 20.3 Mate

'ls -l' in Linux VM & 'dir /a' in Windows host are different(?)

Post by abcdefgh »

A file, 'foo.txt', on a virtual USB, 'FFox profile.vhd', appears in Linux but not in Windows. Also, '$RECYCLE.BIN' appears in Windows but not in Linux. Look.

Code: Select all

mark@mark-VirtualBox:~$ cd "/media/mark/FFox profile"
mark@mark-VirtualBox:/media/mark/FFox profile$ ls -l
total 40
drwxrwxrwx 1 mark vboxsf 28672 Aug 16 10:22  ckls0yge.default-release
-rwxrwxrwx 1 mark vboxsf  7248 Sep  9  2015  firefox.png
-rwxrwxrwx 1 mark vboxsf  1727 Aug 16 10:49  foo.txt
drwxrwxrwx 1 mark vboxsf     0 Jun 26 00:09 'System Volume Information'
mark@mark-VirtualBox:/media/mark/FFox profile$

Code: Select all

J:\>dir /a
 Volume in drive J is FFox profile
 Volume Serial Number is B27F-5B0E

 Directory of J:\

22/08/16  11:16 AM    <DIR>          $RECYCLE.BIN
22/08/14  10:58 PM    <DIR>          ckls0yge.default-release
15/09/09  08:52 AM             7,248 firefox.png
22/08/16  11:30 AM    <DIR>          System Volume Information
               1 File(s)          7,248 bytes
               3 Dir(s)   1,119,010,816 bytes free

J:\>chkdsk
The type of the file system is NTFS.
Volume label is FFox profile.

WARNING!  F parameter not specified.
Running CHKDSK in read-only mode.

CHKDSK is verifying files (stage 1 of 3)...
  22784 file records processed.
File verification completed.
  121 large file records processed.
  0 bad file records processed.
  0 EA records processed.
  0 reparse records processed.
CHKDSK is verifying indexes (stage 2 of 3)...
  25306 index entries processed.
Index verification completed.
  0 unindexed files scanned.
  0 unindexed files recovered.
CHKDSK is verifying security descriptors (stage 3 of 3)...
  22784 file SDs/SIDs processed.
Security descriptor verification completed.
  1261 data files processed.
Windows has checked the file system and found no problems.

   1538047 KB total disk space.
    728664 KB in 4474 files.
     12232 KB in 1263 indexes.
         0 KB in bad sectors.
     27955 KB in use by the system.
      4448 KB occupied by the log file.
    769196 KB available on disk.

      4096 bytes in each allocation unit.
    384511 total allocation units on disk.
    192299 allocation units available on disk.

J:\>
How can that be?
I'm actually markfilipak (which somehow became 'markfilipak2', then 'abcdefgh'). I've been here since 15 Jul 2012 but lost my name during the great shift to SSO (single sign-on) during 2017, and have not been able to recover it.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: 'ls -l' in Linux VM & 'dir /a' in Windows host are different(?)

Post by fth0 »

abcdefgh wrote:How can that be?
Timing and caches.
abcdefgh
Posts: 77
Joined: 22. Jul 2018, 03:29
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Linux Mint 20.3 Mate

Re: 'ls -l' in Linux VM & 'dir /a' in Windows host are different(?)

Post by abcdefgh »

fth0 wrote:
abcdefgh wrote:How can that be?
Timing and caches.
How can that be? Between the time that I ran 'ls -l' and 'dir /a' I closed the VM and mounted the virtual USB in Windows Disk Management. No, not timing & caches. How else can it be?
I'm actually markfilipak (which somehow became 'markfilipak2', then 'abcdefgh'). I've been here since 15 Jul 2012 but lost my name during the great shift to SSO (single sign-on) during 2017, and have not been able to recover it.
arQon
Posts: 228
Joined: 1. Jan 2017, 09:16
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu 16.04 x64, W7

Re: 'ls -l' in Linux VM & 'dir /a' in Windows host are different(?)

Post by arQon »

$RECYCLE.BIN wouldn't have been created until the first time you mounted the drive on a windows host, and probably not even until you actually not-deleted something from it.

Given that between A and B you have *both* a recycle bin created *and* a file that's gone missing, I ... don't see what the problem is, surely?
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: 'ls -l' in Linux VM & 'dir /a' in Windows host are different(?)

Post by fth0 »

With "timing" I really meant the timing of your actions, since you didn't give much information about what you did when, and: Garbage in, garbage out. SCNR;)
abcdefgh wrote:Between the time that I ran 'ls -l' and 'dir /a' I closed the VM and mounted the virtual USB in Windows Disk Management.
Now you probably "explained" $RECYCLE.BIN and System Volume Information date and time: They are usually created or updated when a disk drive is added to a Windows OS.

Leaves the question of foo.txt, where caches could play a role, again depending on what you did when ...
abcdefgh
Posts: 77
Joined: 22. Jul 2018, 03:29
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Linux Mint 20.3 Mate

Re: 'ls -l' in Linux VM & 'dir /a' in Windows host are different(?)

Post by abcdefgh »

arQon wrote:$RECYCLE.BIN wouldn't have been created until the first time you mounted the drive on a windows host, and probably not even until you actually not-deleted something from it.

Given that between A and B you have *both* a recycle bin created *and* a file that's gone missing, I ... don't see what the problem is, surely?
There is no "between A and B". This was not a transient issue. It is static -- see Replication below.
fth0 wrote:With "timing" I really meant the timing of your actions, since you didn't give much information about what you did when, and: Garbage in, garbage out. SCNR;)
abcdefgh wrote:Between the time that I ran 'ls -l' and 'dir /a' I closed the VM and mounted the virtual USB in Windows Disk Management.
Now you probably "explained" $RECYCLE.BIN and System Volume Information date and time: They are usually created or updated when a disk drive is added to a Windows OS.

Leaves the question of foo.txt, where caches could play a role, again depending on what you did when ...
It's reasonable that you both think this is a matter of caching or timing. I don't see how either is possible.
'$RECYCLE.BIN' was automatically created by the Windows host when I created and formatted the 'FFox profile.vhd' virtual USB (which was many moons ago). It is empty.
'foo.txt' was created yesterday (via Linux 'xed', while I was in the VM).
Replication.
I'm going to follow this post by posting 2 more posts.
The 1st post will be the output of "ls -l".
Then I'll quit the VM and return to the Windows host, mount 'FFox profile.vhd' via Windows Disk Management -- it will probably mount as "J:". (By the way, the 'FFox profile.vhd' file system is NTFS.) Then, I'll detach 'FFox profile.vhd', launch the VM, and return here to post the 2nd post.
The 2nd post will be the output of "dir /a".
Kindly stand by while I take those steps. The 2 posts will bump this topic, twice.
I'm actually markfilipak (which somehow became 'markfilipak2', then 'abcdefgh'). I've been here since 15 Jul 2012 but lost my name during the great shift to SSO (single sign-on) during 2017, and have not been able to recover it.
abcdefgh
Posts: 77
Joined: 22. Jul 2018, 03:29
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Linux Mint 20.3 Mate

Re: 'ls -l' in Linux VM & 'dir /a' in Windows host are different(?)

Post by abcdefgh »

Code: Select all

mark@mark-VirtualBox:/media/mark/FFox profile$ ls -l
total 40
drwxrwxrwx 1 mark vboxsf 28672 Aug 17 09:59  ckls0yge.default-release
-rwxrwxrwx 1 mark vboxsf  7248 Sep  9  2015  firefox.png
-rwxrwxrwx 1 mark vboxsf  1727 Aug 16 10:49  foo.txt
drwxrwxrwx 1 mark vboxsf     0 Jun 26 00:09 'System Volume Information'
mark@mark-VirtualBox:/media/mark/FFox profile$ 
I'm actually markfilipak (which somehow became 'markfilipak2', then 'abcdefgh'). I've been here since 15 Jul 2012 but lost my name during the great shift to SSO (single sign-on) during 2017, and have not been able to recover it.
abcdefgh
Posts: 77
Joined: 22. Jul 2018, 03:29
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Linux Mint 20.3 Mate

Re: 'ls -l' in Linux VM & 'dir /a' in Windows host are different(?)

Post by abcdefgh »

Code: Select all

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Windows\System32>j:

J:\>dir /a
 Volume in drive J is FFox profile
 Volume Serial Number is B27F-5B0E

 Directory of J:\

22/08/16  11:59 PM    <DIR>          ckls0yge.default-release
15/09/09  08:52 AM             7,248 firefox.png
22/08/16  10:49 AM             1,727 foo.txt
22/06/26  12:09 AM    <DIR>          System Volume Information
               2 File(s)          8,975 bytes
               2 Dir(s)   1,120,292,864 bytes free

J:\>
Well, I'll be damned. Now they match. And '$RECYCLE.BIN' has disappeared?!? I know that the 'only' explanation is that I've gone addle brained, but don't say it, eh? I swear that yesterday I quit the VM and mounted 'FFox profile.vhd' (as J:, via Windows Disk Manager), and 'foo.txt' was not there ...my previous posts, here, confirm that.

Well, it's a mystery.
I'm actually markfilipak (which somehow became 'markfilipak2', then 'abcdefgh'). I've been here since 15 Jul 2012 but lost my name during the great shift to SSO (single sign-on) during 2017, and have not been able to recover it.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: 'ls -l' in Linux VM & 'dir /a' in Windows host are different(?)

Post by fth0 »

Compare the date/time of "System Volume Information" in the four outputs of this thread. In your latest Windows output, the date/time is older again. It's an interesting puzzle at least. ;)
abcdefgh
Posts: 77
Joined: 22. Jul 2018, 03:29
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Linux Mint 20.3 Mate

Re: 'ls -l' in Linux VM & 'dir /a' in Windows host are different(?)

Post by abcdefgh »

fth0 wrote:Compare the date/time of "System Volume Information" in the four outputs of this thread. In your latest Windows output, the date/time is older again. It's an interesting puzzle at least. ;)
Wow! Great sleuthing! They are different. But trust me, it is the exact same virtual USB. You see, I have 2 virtual USBs. One is my TBird profile and email store. The other is my FFox profile. Having the profiles/email on virtual USBs makes it easy to back them up in the Windows host, and it means that the Linux guest virtual disk will not grow too large.

This morning, I had to rebuild the Linux guest, but I didn't touch the virtual USBs, so all that I have posted are valid. Strange but valid.
I'm actually markfilipak (which somehow became 'markfilipak2', then 'abcdefgh'). I've been here since 15 Jul 2012 but lost my name during the great shift to SSO (single sign-on) during 2017, and have not been able to recover it.
arQon
Posts: 228
Joined: 1. Jan 2017, 09:16
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu 16.04 x64, W7

Re: 'ls -l' in Linux VM & 'dir /a' in Windows host are different(?)

Post by arQon »

abcdefgh wrote: Well, I'll be damned. Now they match.
You know what? They don't. :)

There was a 20-minute gap between those two posts, but:
> drwxrwxrwx 1 mark vboxsf 28672 Aug 17 09:59 ckls0yge.default-release
> 22/08/16 11:59 PM <DIR> ckls0yge.default-release
and they were posted in that order.

ext3 doesn't cascade directory times up the way NTFS does, but that doesn't matter here anyway because of the ordering. IDK where 10 hours away from UTC is, but it looks to me like at least one of your systems is misconfigured. It won't be the cause of this weirdness, but it seems worth mentioning and correcting.
Post Reply