I have read several ways to delete files with special characters, but none of them works for me in one special folder in my cache system.I have no idea how the files got there, and why they turned into ghost files.if i do: ls -li in my cache\1\a folder I get the following list (partial screen dump):335413265 -rw-r--r-- 1 www-data www-data 58734 Jul 30 08:18 1ah17.xml335413267 -rw-r--r-- 1 www-data www-data 63256 Aug  2 22:12 1ah1.xml        ? ?????????? ? ?        ?            ?            ? 1ah2.xml        ? ?????????? ? ?        ?            ?            ? 1ah+-+cyan12.xml        ? ?????????? ? ?        ?            ?            ? 1ah+-+cyan1.xml        ? ?????????? ? ?        ?            ?            ? 1ah+-+cyan30.xml        ? ?????????? ? ?        ?            ?            ? 1ah+-+cyan31.xml        ? ?????????? ? ?        ?            ?            ? 1ah+-+gr%C3%B8n1.xml        ? ?????????? ? ?        ?            ?            ? 1ah+-+gr%C3%B8n5.xml        ? ?????????? ? ?        ?            ?            ? 1ah+-+gr%C3%B8n6.xml        ? ?????????? ? ?        ?            ?            ? 1ah+-+r%C3%B8d1.xml        ? ?????????? ? ?        ?            ?            ? 1ah+-+sort2.xml335413265 -rw-r--r-- 1 www-data www-data 58734 Jul 30 08:18 1ah+-+sort3.xml        ? ?????????? ? ?        ?            ?            ? 1ah+-+sort8.xml242562822 -rw-r--r-- 1 www-data www-data 61613 Aug  2 07:35 1amp+operations+in+crimping+tool+number+of+pins%3A+-1.xmlSo I get a lot of files without an inode number. If I do a find in the folder I get a lot of errors saying that it can't read the ghost files.How can I get rid of these files and/or the entire folder?
Delete ghost files with special characters
files;directory;rm
The rows of ? characters indicate directory entries that don't correspond to a file. This is a sign that your filesystem is damaged. You won't be able to call rm to remove these files because the files are not actually there, there's only a dangling label. You need to run a filesystem check and repair (fsck).Given that this is on your root partition, as advised by garethTheRed, reboot your system and force an fsck on reboot. There are several ways of forcing an fsck on reboot:touch /forcefscktune2fs -C 999999999 /dev/sda1 where sda1 is the block device containing the filesystemPass the command line option forcefsck to the kernel at boot time