Hi, i have an unwanted file in my images folder and i am trying to delete this file without succes; My normal ftp program doesn't delete the file and with putty i tried rm watermark.php?folder=voor_dat&width=300&article=6163 2/ is there a way to change the extension of this file to .jpg? regards
That's a script and not an image. To remove a file, do what you were trying. You can also hit tab to get a list of possible options. TO remove the above script use: rm watermark.php
i tried your suggestion but i get rm: cannot remove watermark.php: No such file or directory it still there. btw it outputs an image in jpg. But in this case i see the extension is set to php?folder=voor_dat&width=300&article=6163 Code (markup):
you will need to find the folder on the server, if your not sure where the main folder is check your apache config you can find the path there then. cd toimagefolder then rm theimage.jpg
try rm -rf 'watermark.php?folder=voor_dat&width=300&article=6163' or rm -rf "watermark.php?folder=voor_dat&width=300&article=6163" put '' or ""
>> You can login to your image folder and then delete that particular file from that folder. You can refer to the below steps to delete the file: cd imagefolder Then use rm-r filename
Here you can use the following commands to delete the files/folders - rm filename.txt To delete a whole folder and its content recursively: - rm -rf foldername/ To delete all files/folders in the current directory: - rm -rf*
Thats a script and its creating the image using the actual image location in some other folder. I recommend to view the source code of the script to find where exactly the images are located. You can delete those images or replace them if you wanted.
The issue that you are having is probably a result of the special character ? with putty, you can perform an autocomplete by hitting TAB, so my recommendation would be to write the following... #rm -f watermark and then hit tab, and then surround the entire filename with double quotes " see if that works. If that does not work, verify that you are the owner of the file #ls -l "watermark*" also check the permission. For now, it may be best to just set the permissions to 777 #chmod 777 "watermark*" and then try to delete it again. If all that does not work, then create a new folder called "temp" and then move the file into that folder #mv "watermark*" temp/ and then delete temp #rm -fR temp and if that still does not work, then change directory into the temp directory... #cd temp/ perform a list to view the contents and verify the file is inside #ls -lA and then we will run another command for the purposes of deleting content. Be careful, as this will delete everything in the folder #find . -type f -delete hopefully one of those suggestions will resolve your issue