Linux中`../`的含义是什么?

问题描述 投票:0回答:1

我正在对memcached和Ubuntu进行一些练习。我到了一步,我看到了这个:

user1@user1-VirtualBox:~/temp$ cat ../synchro.sh

该文件的内容是:

#!/bin/bash
server="--servers localhost"
key="test30"
getkey="memccat $server $key"
$getkey
if [ $? -ne 0]
 then
  echo "ERROR - cache miss"
  /usr/bin/memccp $server --expire=30 $key && $getkey
 fi

我在temp文件夹中创建了一个文件,但是当我再次运行命令时,我得到了同样的错误:

cat: ../synchro.sh: No such file or directory

我使用../cat ../等进行了Google搜索,但我没有看到任何解释../含义的结果。

shell syntax
1个回答
3
投票

这不是“Ubuntu”的东西,而是POSIX文件系统的东西。

../表示父目录的路径。

例:

cd /Home/directory
cd ../

键入这两个命令后,我将在/Home

您可能还看过qazxsw poi这是当前目录。

© www.soinside.com 2019 - 2024. All rights reserved.