这更像是一种好奇心,但我注意到/etc/httpd/logs
符号链接到/var/log/httpd
,但是当我在里面时/etc/httpd/logs
,ls -la
我看到:
drwx------ 2 root root 4096 Mar 21 14:58 .
drwxr-xr-x 9 root root 4096 Mar 17 03:10 ..
Run Code Online (Sandbox Code Playgroud)
为什么.
条目不显示 lrwx....
?
但是当我去/etc/httpd
和做ls -la
我看到:
lrwxrwxrwx 1 root root 19 Mar 4 17:12 logs -> ../../var/log/httpd
Run Code Online (Sandbox Code Playgroud)
我可以回答一个问题吗?假设您在此处安装了 RedHat/CentOS...
ls /etc/httpd/
# should return something like:
# conf conf.d logs modules run
cd /etc/httpd/logs/
# Why does this next command fail?
ls ../conf
# ls: cannot access ../conf: No such file or directory
# But this next command works?
cd ../conf
Run Code Online (Sandbox Code Playgroud)
简短的回答是,当您在“内部” /etc/httpd/logs
(符号链接)时,您实际上是在内部/var/log/httpd
,这是一个目录。
cd /etc/httpd/logs/
pwd
# /etc/httpd/logs
pwd -P
# /var/log/httpd
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
2246 次 |
最近记录: |