1

I was trying to rename a folder on my Linux webserver. I added a double slash infront of older name e.g //foldername. Now the ftp showed this message

Renaming '/public_html/cache/test' to '/test'
Command: RNFR test
Response: 350 RNFR accepted - file exists, ready for destination
Command: RNTO /test

1
  • I think you don't use the command correct, you don't have to put / in front of the name you want to put, example : mv /public_html/cache/test test It went to your root folder because mv is both rename and move command, and with the slash it is accepted as move command. – knif3r Feb 21 '16 at 23:37
1

Check the files inside the ROOT directory of your server.

Example:

root@dev7:/# cd /
root@dev7:/# ls
bin   etc         lib         mnt   root     srv  usr
boot  home        lost+found  opt   sbin     sys  var
dev   initrd.img  media       proc  selinux  tmp  vmlinuz
root@dev7:/# cd //
root@dev7://# ls
bin   etc         lib         mnt   root     srv  usr
boot  home        lost+found  opt   sbin     sys  var
dev   initrd.img  media       proc  selinux  tmp  vmlinuz
root@dev7://

As you know, ./ means current directory and ../ means parent directory but / and // and even //(...) all go to the ROOT. (Why it displays two // in root@dev7://# beats me.)

My guess is that you now have another folder in your root directory, /test and you should check that.

2
  • Thanks ... it really went it to the root... Now a little more help... I tried this when finding .... rnfr /app rnto app .... what does this command do? – S. A. Malik Jul 18 '12 at 18:29
  • @backTangent - I'd stick with the "move" command: mv /path/to/folder /path/to/newfolder You really shouldn't be doing the rnfr rnto commands, those are FTP commands. (Your FTP server will pick those up and actually execute the mv command). For "renaming" files, you just cd into the directory you want, and issue mv oldfile.txt newfile.txt which actually does cp oldfile.txt newfile.txt;rm oldfile.txt but saves a copy in /target/ (not accessible by default). Don't worry about any of that. – ionFish Jul 18 '12 at 18:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.