Skip to main content
added 1 character in body
Source Link

It all started in windows , where I found on a USB stick key several files with no name or with strange names, listed as created in 1980 and that could not be removed, as shown below Windows example. The error messages I got when trying to remove them were either "Permission required" or "The file name is too long". Ok, I said, I will turn to linux (actually, I just opened the MobaXterm terminal, thinking it would be a 5 seconds job).

I navigated to the incriminated folder, and just typed

ls -l

to find out that the command returned the names of all the other files in the folder, while fo the files "from the 80s" it listed the following message:

"ls: ./0: No such file or directory"

The same message was shown for all the files from the 80s. Following the suggestion from some other forum, I tried to get the inode name for the files using

ls -li

But (as expected) I got the inode number for all the files excepted those "from the 80s", for which I still got the message

ls: ./a: No such file or directory

Thinking I was smart, I tried to work on the creation date. I found a suggestion on how to remove files created before a given date here. I created the timestamp file as suggestesuggested (with the same date); then, as a check, I just run the find part, without executing the removal part. What I got was the list of a few files older than the timestamp and a series of messages like the one shown below

find: ./a: No such file or directory

So: what should I try now? I am open to solutions in windows or ubuntu.

It all started in windows , where I found on a USB stick key several files with no name or with strange names, listed as created in 1980 and that could not be removed, as shown below Windows example. The error messages I got when trying to remove them were either "Permission required" or "The file name is too long". Ok, I said, I will turn to linux (actually, I just opened the MobaXterm terminal, thinking it would be a 5 seconds job).

I navigated to the incriminated folder, and just typed

ls -l

to find out that the command returned the names of all the other files in the folder, while fo the files "from the 80s" it listed the following message:

"ls: ./0: No such file or directory"

The same message was shown for all the files from the 80s. Following the suggestion from some other forum, I tried to get the inode name for the files using

ls -li

But (as expected) I got the inode number for all the files excepted those "from the 80s", for which I still got the message

ls: ./a: No such file or directory

Thinking I was smart, I tried to work on the creation date. I found a suggestion on how to remove files created before a given date here. I created the timestamp file as suggeste (with the same date); then, as a check, I just run the find part, without executing the removal part. What I got was the list of a few files older than the timestamp and a series of messages like the one shown below

find: ./a: No such file or directory

So: what should I try now? I am open to solutions in windows or ubuntu.

It all started in windows , where I found on a USB stick key several files with no name or with strange names, listed as created in 1980 and that could not be removed, as shown below Windows example. The error messages I got when trying to remove them were either "Permission required" or "The file name is too long". Ok, I said, I will turn to linux (actually, I just opened the MobaXterm terminal, thinking it would be a 5 seconds job).

I navigated to the incriminated folder, and just typed

ls -l

to find out that the command returned the names of all the other files in the folder, while fo the files "from the 80s" it listed the following message:

"ls: ./0: No such file or directory"

The same message was shown for all the files from the 80s. Following the suggestion from some other forum, I tried to get the inode name for the files using

ls -li

But (as expected) I got the inode number for all the files excepted those "from the 80s", for which I still got the message

ls: ./a: No such file or directory

Thinking I was smart, I tried to work on the creation date. I found a suggestion on how to remove files created before a given date here. I created the timestamp file as suggested (with the same date); then, as a check, I just run the find part, without executing the removal part. What I got was the list of a few files older than the timestamp and a series of messages like the one shown below

find: ./a: No such file or directory

So: what should I try now? I am open to solutions in windows or ubuntu.

Source Link

Remove files with strange name, no inode name, and not shown by ls

It all started in windows , where I found on a USB stick key several files with no name or with strange names, listed as created in 1980 and that could not be removed, as shown below Windows example. The error messages I got when trying to remove them were either "Permission required" or "The file name is too long". Ok, I said, I will turn to linux (actually, I just opened the MobaXterm terminal, thinking it would be a 5 seconds job).

I navigated to the incriminated folder, and just typed

ls -l

to find out that the command returned the names of all the other files in the folder, while fo the files "from the 80s" it listed the following message:

"ls: ./0: No such file or directory"

The same message was shown for all the files from the 80s. Following the suggestion from some other forum, I tried to get the inode name for the files using

ls -li

But (as expected) I got the inode number for all the files excepted those "from the 80s", for which I still got the message

ls: ./a: No such file or directory

Thinking I was smart, I tried to work on the creation date. I found a suggestion on how to remove files created before a given date here. I created the timestamp file as suggeste (with the same date); then, as a check, I just run the find part, without executing the removal part. What I got was the list of a few files older than the timestamp and a series of messages like the one shown below

find: ./a: No such file or directory

So: what should I try now? I am open to solutions in windows or ubuntu.