Whenever fsck
goes through the system and tries to recover damaged files, it will put them into the lost+found folder. I guess this is basically a problem with fsck
creating that folder even if there's nothing to put in. As Ubuntu periodically runs those checks on your partitions, those folders will always be re-created, so deleting it won't work.
If you just want to hide the folder from Nautilus, you can create a '.hidden' file containing 'lost+found' and put it into the lost+found parent's folder.
Eg. for the lost+found folder in '/':
echo "lost+found" | sudo tee /.hidden
For the one in you home directory (if any):
echo "lost+found" > ~/.hidden
I guess alternatively you can remove them after every boot by adding the following to the file '/etc/rc.local':
if [ -d /lost+found ]; then
rmdir /lost+found 2>/dev/null
fi
if [ -d /home/USER/lost+found ]; then
rmdir /home/USER/lost+found 2>/dev/null
fi
This will run rmdir
on the folders if they exist, which only removes them if they are empty (2>/dev/null
will discard the "not empty" message from rmdir
). There probably aren't lots of directories, so I kept it simple. Just make sure 'exit 0' stays on the bottom line.
Downside: this only keeps track of directories created by fsck
during boot. If it's run at a later time, you'll again see that directory. You then could put above into a periodically executed cron job.
fsck will recreate the lost+found directory if it is missing.
On startup most distributions run fsck if the filesystem is detected as not being unmounted cleanly.
As fsck creates the lost+found directory if it is missing, it will create it then and place anything that it finds into that directory.
So you can remove it but not recommended (as per Marcelo comment).
Best Answer
When a file / dir has special characters and won't delete, you can try to remove it using it's inode number more information on inodes in ext3.
To do so,
cd
to the location of the files or directories with the "special characters".Run
Note the "inode" number (Here 1312883)
Then run a find and remove on that "inode"
and then to make sure that is has gone.
I hope that this helps.