1

I'm currently using MSYS2 on Windows10 and I tried to execute du in the MINGW64 Shell Launcher on a USB formatted as exFAT.
Assuming the USB is mounted on /g/, the structure of the USB is pretty much like this:

/g/$Thesis/
/g/Giochi/
/g/PROGRAMMING/
/g/System Volume Information/
/g/Video/
/g/_$CR/
/g/test/

When I execute du -sh /g/* this is what I get:

0       /g/$Thesis
du: fts_read failed: /g/Giochi/Lobotomy-Corp/Saves/Sav1/Lobotomy/Unity: No such file or directory
6.6M    /g/PROGRAMMING
8.0K    /g/System Volume Information
0       /g/Video
0       /g/_$Cr
20K     /g/test

The structure of the problematic folder Giochi/Lobotomy-Corp/Saves/Sav1/Lobotomy/Unity/ is something like this:

...
Lobotomy/
|...
|--Unity/
   |--local.775c7d8c8116fb84a9c9bb47890hg7a8/
      |--Analytics/
         |--config
         |--values
         |--ArchivedEvents/
            |--879942335000001.1sa7f78b/
               |--e
               |--g
               |--h

I copied all the files from this USB to a new USB. Assuming this new USB is mounted on /h/, this is what I tried to do:

  • I formatted the new USB as exFAT, executed du -sh /h/* but the error was the same on that particular folder
  • I formatted the new USB as FAT32, executed du -sh /h/* but the error was the same on that particular folder
  • I tried du -sh on the same files but on my Desktop that is formatted as NTFS and it worked:

    0       /old-USB-files/$Thesis
    429K    /old-USB-files/Giochi/    
    6.6M    /old-USB-files/PROGRAMMING
    2.0K    /old-USB-files/System Volume Information
    0       /old-USB-files/Video
    0       /old-USB-files/_$Cr
    5.0K    /old-USB-files/test
    
  • I formatted the new USB as NTFS, executed du -sh /h/* and it worked

Then I started to make some tests on the new USB formatted as exFAT/FAT32 by copying specific files:

  • I copied only the Unity folder, executed du -sh /h/Unity and it worked
  • I copied only the Lobotomy folder and executing
    du -sh /h/Lobotomy gave the error but
    du -sh /h/Lobotomy/ gave the right output with no errors

Could the du command on MSYS2 be the problem ?
There's something wrong about du on exFAT/FAT32 filesystems in general or on USB formatted like that ?

EDIT:

I recently installed WSL1 with Ubuntu 18.04 LTS on my machine.
I formatted the new USB as exFAT, copied the files, created a mount point /mnt/h and mounted the new USB with

sudo mount -t drvfs H: /mnt/h

Then I ran du -sh /mnt/h and it worked with no problem whatsoever.
Could MSYS2 actually be the problem ?

2
  • Check the flash drive for file system errors (chkdsk).
    – Robert
    Nov 11, 2019 at 18:00
  • I checked the old USB and the new one but no error were found.
    – AlbyTree
    Nov 11, 2019 at 18:09

0

You must log in to answer this question.

Browse other questions tagged .