How to know the full path of a file using SSH?

I'm beginner for SSH stuff, but I want to dump a big sql file and for that I need to be able to navigate to the appropriate path in my hosting account. I managed to login to SSH and I typed pwd, but it gave me a shared hosting pathway like /home/content/r/o/s/roshanjonah

How can I go to the path where, I upload my files to. I use FTP, but in FTP path it just shows / so I cannot go any further back than that. So using SSH how can I come to this path in FTP.


Solution 1:

Your FTP connection and your SSH connection are completely different. Depending on how the FTP is configured, you may or may not land in the same place as your FTP. Try uploading a file via FTP and see if you see it in the same directory as your SSH connection lands you in. If not, can you list the directory? See if you can navigate around on SSH and find those files you see in your FTP session.

Otherwise, it wouldn't hurt to just ask your hosting provider and/or read the FAQ.

Solution 2:

FTP's root is not the actual root directory of the system, but one that is designated as that root. SSH's root directory, by default is the actual root. For instance, on a web host that I use my home direcotry is /home/username, but my FTP's root directory is /home/username/public_ftp.

There is a very good chance that your FTP root is under your home directory someplace an you could use the find command to find it. Upload a file with a unique name and use "find /home/yourusername -name uniquefilename.txt" and see what you find. If you don't find it there, all of the FTP data may be some other place. You can ask your hosting provider if you get stuck.