Wednesday, March 18, 2015

linux - How to delete files/folders with illegal names?

How can I delete a set of files that contain illegal characters including new lines? The file system is FAT32.


On Windows, besides trying with Explorer, which gave me a 80004005 error, I've tried rmdir, del /F and del "\\?\drive\...", from Administrator CMD of course.


On a friend's Ubuntu, I've tried rm -rf, which has given no results, besides errors of course.


The errors I've been getting from both systems revolve around the illegality of the syntax and no having no permissions. The 80004005 erros come from attempting to delete the parent folder. I've tried to chmod the files into complicity but it had no effect.


Curiously enough, attempting to view the files in Ubuntu's Explorer has also resulted in an error:
LS of the folder and an error from Ubuntu's Explorer


Additionally some of the files seem to contain new lines within their names. Very strange indeed. I don't really understand how this was allowed in the first place.


Is there anything else I could try besides a reformat?


Context: I'm getting into the whole password manager thing, and as part of that, I wanted to have a portable copy of my password manager on my USB stick. As such I've downloaded the portable version, and using WinRAR, I've attempted to unzip it into the USB. Errors occurred, iirc of similar nature, and now we're here.
The broken files only exist within the XSL which as a whole is broken. I'm not sure what WinRAR has done wrong, since initally it was only supposed to be 5 xsl files.
The password manager was KeyPass 2.

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...