I'm trying to locate where some files are stored and I can easily browse to them via ssh by going to "cd ~/foldername", however, I have no idea what directory "~/" actually is.
When I browse around folders via WinSCP (yes, I'm a Windows admin), I can't seem to locate this folder at all.
Note: I'm using Amazon Linux on EC2.
This information was helpful in any case though, thanks!
– Jason Davis Jan 18 '13 at 18:16echo ~. There's not even a folder with that name, because any command getting it as an argument will actually be passed the value of$HOME, not~. – njsg Jan 18 '13 at 18:25/home/$(whoami)but for whatever your home directory is. In some systems, regular uses have those under/usr/, and I thinkroot's$HOMEused to be/. – njsg Jan 18 '13 at 18:27~actually expands to the current value of$HOME, not necessarily to the current user's home directory. Normally they'll be the same, but it is possible to modify the value of$HOME. (This is rarely a good idea.) On the other hand,~foodoes expand to the home directory of userfooas defined in/etc/passwdor in your system's equivalent. – Keith Thompson Jan 18 '13 at 19:03~/fileexpands just to$HOME/file, and the environment variableHOMEis set on login from your/etc/passwdentry (or wherever it comes from). You are free to change its value. Any resulting pain is then self-inflicted. – vonbrand Jan 21 '13 at 18:06