Folder missing in ubuntu

Here is the screen shot from ls - l. The folder in question "My Files" is obviously not showing in the right path.

After doing more research, I saw I could remove a link with the "rm" command. I used it but then it deleted the folder it was connected to on my NTSF drive. It's gone. Thankfully I had a back up of the folder.

The error at the start could be a clue, but honestly, I'm not sure what's going on:

ls: cannot read symbolic link 'My Files': Invalid argument

Where is the link supposed to point to? Was it created on Linux or Windows?

On Windows, we can check with dir /A. Here's an example scenario (with cmd.exe as admin):

C:\Users\User\Desktop>mklink /D SoftLink ..\Documents
symbolic link created for SoftLink <<===>> ..\Documents

C:\Users\User\Desktop>mklink /D /J HardLink ..\Documents
Junction created for HardLink <<===>> ..\Documents

C:\Users\User\Desktop>dir /A
21/02/2025  02:53 PM    <DIR>          .
19/10/2022  09:49 PM    <DIR>          ..
19/10/2022  08:52 PM               282 desktop.ini
21/02/2025  02:57 PM    <JUNCTION>     HardLink [C:\Users\User\Documents]
21/02/2025  02:53 PM    <SYMLINKD>     SoftLink [..\Documents]

I just learnt that Windows has a concept of "directory junction"... some kind of alternate symlink.[1]

3 Likes

Since I removed that link which caused the folder to be deleted, I won't need to try to fix anything. I had a back up of the folder which I copied to the windows D drive. Now I can see it again in my Ubunut Mate folders.

1 Like

Do you want to create link to shared folder between windows and linux? Care of automount windows folders at start of linux, use Disk app to set it up. You should share a partition instead of folder. Create a partition in exFat, automount in both, then easy to read write in windows and linux. Always, do the simple solution

3 Likes

My Windows volumes are showing up in Linux. They are partitions. I can save work to folders on the partitions which is what I want to be able to do. So I think I am good. I don't need to do any kind of a link. What I tried to do at the onset was put a link on my linux desktop which would open the windows folder when I clicked on it. I won't try that again. Guess I don't need to.

4 Likes

(post deleted by author)