When I copy a folder which contains text files to a USB drive, remove it and move it to another computer, the computer deletes the contents

Hi, when I copy a folder which has text files in it, when I remove the USB drive and put the USB drive in another computer (both PCs are running EndeavourOS), as soon as I mount it, the computer deletes the contents inside the text files.

I have tried changing the partition of the USB drive, I have removed the USB drive safely etc. I am not too sure why this keeps happening?

1 Like

Never experienced something like this…
Since you’ve already experimented with partitions, as a preliminary guess, I would suspect there is some foreign/unwanted script running.

One thing I’ll request you to do is to boot into a live iso on the second PC. Copy files on USB using first computer. Then try mounting the USB on to the second computer via the live iso. If the files are accessible and contents visible then you could confirm that the problem is not with the usb, but rather with the configuration on the PC.

Maybe some sync tool at work?

1 Like

It doesn’t seem to be happening the other way around and also I changed USB drives and this seems to have not occurred on the other usb drive.

Could be that, I am using KDE, so I was wondering if you knew how to like “forget” the USB drive if that even makes sense like you can on Windows?

I can give that a try, thanks :slight_smile:

1 Like

Nah it shouldn’t be touching my USB drive, does it have to do with KDE?

Never experienced that kind of behaviour and I’m using KDE since my Linux journey started.

I’m unaware of the feature you mention. What is it exactly called on windows? I’ve used Windows most of my eighteen years so maybe I’ll remember if you tell the exact name of the feature you’re referring to.

This is spooky…

It shouldn’t doesn’t mean it doesn’t. Depending on configuration this could happen (automount, autosync, etc)

Another possibility could be that there is an active filter in your file manager which only prevents the files from being shown. In your description of the problem I read that this only happens with .txt files.
Did you try a ls -al with that stick?

1 Like

If you use KDE with (more or less) default settings, deleted files should appear in trash. Did you have a look there?

I think you just right click on the drive, and you can uninstall it or something like that.

yeah it is indeed lol

Are you referring to a cloud storage like Mega cloud or something like that?

KDE doesn’t automount but it prompts me to mount it.

I did and I am the owner of the files and I have read privilages.

Oh, nope, the files were still in my USB drive, but the text files were emptyed out :frowning:

Okay. So I misunderstood the whole problem. I thought you meant something like rm $filename when stating deleted.
That is indeed kind of strange.

1 Like

What filesystem do you use with this stick?

@unix_lover, what filesystem is on the USB drive? If it is any “linuxy” system like Ext4 there may be a problem that copied files retain their permission. So user id=1000 on one computer may be a different user on the other computer and therefore the files will have problem with access. Better to switch to FAT32 which doesn’t retain permission information (there are other issues but it depends on your usage if it is a real issue).

Also, is it possible that the text files you copied are in fact symbolik links? Check the original directory with ls -halF and it will show redirection -> if it is only a link.


If the thumbdrive is in ext format, then use the chattr command to lock the text files.

This may at least provide you with a useful error message when the drive is mounted for access in your file manager.


It turns out after a reboot this is not happening no longer. I have idea why this was happening from the start. Must be a bug with Arch or something?

I highly doubt that. If that was the case a lot more users would be writing about it.

What theory do you have that could explain the issue?


Honestly I have no idea, sorry mate

Most logic explanation is that you did an update of a critical library (for example libc) but the application (for example Thunar file manager) was still using function calls from the previous version of the library because it was unavare that the library changed.
All that is necessary is re-lauch the application so it properly loads all necessary libraries.
Anyway its just a wild guess. :man_shrugging:

Or it was … you know … broken. That happens too.

1 Like

When I did an update, I did a reboot to the system and that is when I had the USB bug thing, but after another reboot it seemed to fix :slight_smile:

yeah true mate