The problem is invisible, but can be seen if you know what to look for: The file name includes a space at the end. I highlighted the ls output in the post in this screenshot:. Using tab completion would have also completely sidestepped the problem here, as bash is smart enough to escape spaces correctly It's also a good habit in general, speeds up typing paths so much. So I had this problem and none of these things worked for me.
What worked was creating a file with the exact same name. It was a folder named Example. The old folder disappeared and I deleted the new one. I had a similar situation, after using rsync to backup my Pictures directory on a Mac and reading it on Ubuntu. There were two files actually directories with different names, but having the same content.
I deleted one to the Trash using Nautilus , but could not delete the other, even from the command line. It would say:. After checking the inode numbers with ls -i -l it turned out that both directories have the same inode number. Looks like a hard link The solution was surprisingly simple - empty the Trash by right clicking on the icon.
After that both directories were gone. Ubuntu Community Ask! Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group.
Create a free Team What is Teams? Learn more. Ask Question. Asked 6 years, 8 months ago. Active 2 years, 5 months ago. Viewed k times. Whenever I try to delete it both through ftp and terminal, I get the error No such file or directory However, when I ls in the dir, the file is listed and it is also listed in my ftp client. Improve this question. Braiam Uditha Desilva Uditha Desilva 4 4 bronze badges. Didn't work, updated the question.
Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name.
Email Required, but never shown. The Overflow Blog. Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses.
Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Related 2. Hot Network Questions. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses. Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Related Hot Network Questions.
Question feed. The only thing I'm able to do is to copy the entire dir to another dir and when I do this the file in question is not copied over the new directory I get an error saying "No such file or directory".
I need to remove this file from the system and I have other 20 files like this any suggestions would be very welcomed. It's been a while since I was a storage admin, but I recall that we had attempted to set up some shares that had multiple protocols and intended clients i. Linux, Windows, OSX and it was a complete mess. It sounds like you may have a share that had been written to with a Windows system which you are attempting to access via a Linux client. No worries Marcello - I wish I had an answer that could tell you exactly what to do.
That document did seem to highlight some of the OSX things to consider. There are a few settings on the share itself that I can no longer recall regarding file naming standards UTF vs Unicode - again, it's been a while since I have set any of this stuff up. Do you still have a Mac client that can access the share and does it see the same "oddities" in file names? I don't have any experience with Xserve, unfortunately.
0コメント