LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to browse to this folder ? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-browse-to-this-folder-4175559400/)

Volcano 11-20-2015 06:27 AM

How to browse to this folder ?
 
How to browse to this folder ?

~/


I'm using WinScp.

Emerson 11-20-2015 06:31 AM

Code:

cd ~/
This is the logged in user home directory.

Volcano 11-20-2015 06:47 AM

Quote:

Originally Posted by Emerson (Post 5452602)
This is the logged in user home directory.

Thanks... this is complex syntax.

since we already have a folder "/" .... now you are adding a ~ just before ....and it becomes home directory....this is quite cumbersome ....is there any meaning why its like this ?

pan64 11-20-2015 07:24 AM

no, you misunderstood I think
~ itself means the current user's home dir if it was the first char (for example in: cd ~)
~name means the home dir of user named "name". see man bash, tilde expansion

You can add a / afterward if you want to say: it is definitely a directory (not a file or link or something else), but you can ignore that).

RockDoctor 11-20-2015 07:25 AM

Quote:

Originally Posted by Volcano (Post 5452613)
since we already have a folder "/" .... now you are adding a ~ just before ....and it becomes home directory....this is quite cumbersome ....is there any meaning why its like this ?

Yes, there is meaning to it.

michaelk 11-20-2015 08:02 AM

The ~ as explained is a shortcut for the home directory of the user currently logged in. Unless your using the command line it really does not make sense in the WinSCP GUI environment. Are you using the explorer or Norton Commander interface?

Typically by default when you log in and you see the interface running you will be in your users home directory. If you change directories you can click on the little home icon at the top or the ctrl+h keys to go back.

The linux directory structure is often referred to as a tree with / being at the top. You can see the tree if using the explorer interface in the left pane. The users home directory is /home/user name.

Habitual 11-20-2015 08:13 AM

Quote:

Originally Posted by Volcano (Post 5452599)
I'm using WinScp.

I don't believe WinSCP gives a honking hoot about shell expansions.


All times are GMT -5. The time now is 05:11 PM.