92

I have a folder where I transfer home videos from a camcorder to. I find two files in this folder that are not videos...

  1. .fuse_hidden0000002c00000001
  2. .fuse_hidden0000002600000002

What are these files, and can they be safely deleted?

barrypicker
  • 1,193
  • 1
  • 10
  • 15

6 Answers6

113

You can safely ignore .fuse_hiddenXXXX files. It means a file was deleted but there is at least one software which is still using it, so it can't be removed permanently.

It will be done automatically when the relevant software stops using the file or exists. Such files are always gone after umount/reboot. This is how Linux and any Unix works but only FUSE exposes these files to the user.

These are likely files that were meant to be deleted but are somehow still in use.UBF

Mitch
  • 106,657
  • 24
  • 210
  • 268
  • 4
    What created these files? – barrypicker Jul 10 '14 at 04:26
  • 15
    You can find out what application has the file open by using the `lsof` command. `lsof /full/path/name/to/file`. These files are also related too the ntfs-3g file system. – Mitch Jul 10 '14 at 08:31
  • @Mitch: `lsof /full/path/name/to/file` doesn't show anything for my ` .fuse_hiddenXXXX` file. – Tim Dec 08 '14 at 13:57
  • So, you do have a .fuse_hiddenXXXX file? What is the full path to it? also take a look at the second answer [here](http://unix.stackexchange.com/questions/48227/cannot-remove-some-directory-directory-not-empty). – Mitch Dec 08 '14 at 16:13
  • 1
    Try `lsof /just/the/directory/path` instead, that lists everything that has a file open in that directory. Worked for me. – dr. Sybren Apr 09 '15 at 09:53
  • On my system, I had to do `lsof | grep /full/path/name/to/file` Well, you could also just use a unique part of the file name. The point is, `lsof` would not accept any options. – trlkly Sep 11 '15 at 21:19
  • If it helps to anybody to avoid this, it happens when you -let's say- use a file explorer to delete a big folder with many files, then as you see it's taking long so you go "meh, I'll delete it from a terminal better", you cancel the deletion process and run another from a terminal. It seems in the middle something goes wrong, which generates the fuse_hidden files. Probably the first deletion didn't finish yet. – aesede Aug 20 '16 at 19:47
  • 2
    After a hard reboot, I found a bunch of these files but lsof revealed that no process was using them. I deleted them without a problem and nothing bad happened. – mhernandez Jan 22 '17 at 17:22
  • Unfortunately these files don't always get deleted automatically after reboot. – scai Nov 12 '18 at 10:44
  • Also can occur when moving files between filesystems. I had mp3 file open in media player when I moved directory containing that file with `mv`, and when got one of these files that resulted in an error that original directory cannot be removed ( on the original filesystem ) – Sergiy Kolodyazhnyy Dec 20 '18 at 10:04
  • @barrypicker, most likely a filesystem created it (FUSE filesystem) after file was deleted. Here is description of the behavior: https://github.com/libfuse/libfuse/blob/48ae2e72b39b6a31cb2194f6f11786b7ca06aac6/include/fuse.h#L165 – Kuchara Jan 28 '22 at 16:07
1

I had such a file, and I was unable to delete the folder it was located in.

Turns out it was a vim swap file. Closing the vim session(in another terminal) solved the issue.

Yashasvi.G
  • 23
  • 3
1

I had 10GB of fuse files in my Downloads that had a last-modified date of a year and a half ago, so I just deleted them. I ran the lsof command above and it didn't show anything using the file (which would have been really surprising)

I'll uhhh... update this answer I guess if I notice anything went badly from that.

MalcolmOcean
  • 395
  • 4
  • 18
0

for me, it was Sonarr that was creating these keepalive files. I have Sonarr running in a docker, with access to the tv-shows on another server. On this server, the files are being created. Stopping the docker container allowed me to remove the files permanently.

Tim Chaubet
  • 121
  • 5
  • Were the files not removed automatically when the docker container was stopped as explained in [the accepted answer?](https://askubuntu.com/a/493206/225694) – Elder Geek Jul 23 '19 at 13:48
0

Find out which process is using the hidden .fuseXXX file(s) and stop the process. Then you can remove the file(s).

$ lsof {{dir-name}}/.fuse_hidde... 
COMMAND | PID | USER | FD | TYPE | DEVICE | SIZE/OFF | NODE | NAME
  ....  |<PID>| .... | .. | .... | ...... | ........ | .fuse_hidden 

$ sudo kill <PID>
Zanna
  • 69,223
  • 56
  • 216
  • 327
-1

These files can be created on Linux based systems including Chromebook after deleting files and the program used before deletion has not released them or a system shut down suddenly for whatever reason before the delete process completed, which can happen in some instances, and in the case of many of them existing in the same folder there is usually a program fault where the program does not release them after finishing with them, as some may know you can do some file manipulation tasks on files such as delete and move while a program is using files, unlike windows Linux can manage this and completes the tasks after the program using them releases them. they are then deleted or moved etc, if you are curious as to what they were and know what file types you stored in the folder, rename them and the extension then open them, if you have the correct extension they will open in the default program.