在 putty 里面,当我要求查看我的 public_html 文件夹中的所有目录时,它只有 returns 2 个文件夹

inside putty when i ask to see all the directories in my public_html folder it only returns 2 folders

我希望这不是有史以来最愚蠢的问题,但我知道里面有两个以上的文件夹 public_html。

我试过命令:

ls

ls -R

ls -al

ls -d */

是否存在我正在努力解决的权限问题,这就是我看不到其他目录的原因。如你所知,我是 shell/unix.

的新手

提前致谢。

如果您登录到不同的帐户,那么 ~/public_html 将是不同的目录

~表示主目录,每个用户都有自己的主目录。


/home/user1/public_html 以 user1

登录时看起来像 ~/public_html


/home/user2/public_html 以 user2

登录时看起来与 ~/public_html 相同

顺便说一句,root 是特殊的,他们的主目录是 /root/ 而不是 /home/root/

您可以使用命令pwd显示您所在位置的完整路径。

编辑 - 附加信息:
root 可以访问系统中的所有文件。因此,作为 root 用户,您可以转到任何 /home/<username> 目录。
root 可以通过使用 su 命令 su <username>

成为系统上的任何用户