[英]Linux server with . and .. directories
Why does each folder directory in my linux server has . 为什么我的linux服务器中的每个文件夹目录都有。 and .. directories with same files ?
和..目录具有相同的文件? is it user error or by design ?
是用户错误还是设计错误?
Example: I have folder bladelogic with list of these files along with . 示例:我有bladelogic文件夹,其中包含这些文件的列表。 and .. directories which contains same files.
和..包含相同文件的目录。
.
refers to the current directory and ..
refers to the parent directory. 指当前目录,
..
指上级目录。 This is by design. 这是设计使然。
this is by design. 这是设计使然。
.
refers to the current directory and ..
refers to the directory "above" the current one. 指当前目录,
..
指当前目录“上”的目录。 Specifically, suppose you're in a directory /foo/bar/wizzle
. 具体来说,假设您位于目录
/foo/bar/wizzle
。 If you do an ls
in there you'll see .
如果在其中执行
ls
,您将看到.
, which refers to /foo/bar/wizzle
, and a ..
which refers to /foo/bar
. ,它指的是
/foo/bar/wizzle
,而..
指的是/foo/bar
。 You can check this by running ls .
您可以通过运行
ls .
进行检查ls .
(which will give you the same result as just ls
) and ls ..
which will show you the contents fo (这将为您提供与
ls
相同的结果)和ls ..
这将向您显示内容
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.