![]() I've experienced this sort of thing via ftp myself several times, including for files whose names contain trailing spaces. When attempting to access or remove a file remotely, bugs in client or server software can produce such problems. This behavior of ls can be confusing but is not a bug, can can be overridden explicitly by the user (see below). But there are other problematic characters-perhaps the filename contains trailing whitespace, for example. So if you're not piping ls's output to any other command (or redirecting it to a log for viewing), probably your filename doesn't contain control characters. Your success with JdeBP's answer strongly suggests this was the case, though it would've been a good bet even before that.įor ls, when standard output is a terminal, ? characters are printed in their place. TL DR: Run ls -1b, find the filename, copy the line on which it appears, and give that to rm.Īs others have suggested, most likely this is due to limitations in the way ls-and some other programs, including client and server software-handle weird filenames, such as those containing control characters, by default. Output when trying to rm rm: cannot remove ‘qyxdshyikfr_fishing_timeout.png’: No such file or directory ![]() rw-r-r- 1 www-data www-data 222838 May 13 04:14 qyxdshyikfr_fishing_timeout.png I should also note I have removed many other png files uploaded by the same PHP script. Any ideas what may be the issue? I am running a 64 bit version of Ubuntu, but I don't think its a 32/64 bit issue. ![]() I can open the file that supposedly does not exist, but I still can't remove it. I have tried creating a file with the same name and I end up getting two files with the same name. However, when I ls in the dir, the file is listed and it is also listed in my ftp client. ![]() Whenever I try to delete it both through ftp and terminal, I get the error No such file or directory I am trying to remove a png image that was uploaded to my server via a PHP script. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |