- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我想在 tcsh 中映射文件结构。给定的是结构 1,只有物理文件夹,比如:
/map/peter/paul/mary
结构 2 仅包含物理文件夹,但最后一个目录,这是结构 1 的“mary”的符号链接(symbolic link):
/map/horse/dog/mouse ; mouse -> ../../peter/paul/mary
如果我更改为 /map/horse/dog/mouse
并且输入 pwd
,它会告诉我
/map/horse/dog/mouse
如果我在 /map/horse/dog/mouse
中并且如果我制作了一个 cd ..
,我就在
/map/horse/dog
但是如果我在 /map/horse/dog/mouse
中并且如果我执行 ls ..
,它会告诉我 mary
,但不是鼠标
。
我明白cd
会记住之前的工作目录dog
并且cd ..
变回dog
,虽然 ls ..
解析符号链接(symbolic link)并向我展示 mary
,但我希望 ls ..
向我展示 mouse
.
以同样的方式,我希望 ls ../..
向我展示 dog
。
我发现的所有用例都是关于解析符号链接(symbolic link)和显示物理路径的。但就我而言,对于“ls”,我只需要一种方法来接收未解析的路径。
因此,在“/horse/dog/mouse”中并生成“ls ..”,我想看到“mouse”,而不是“mary”。
将“mouse”设为物理文件夹并将“mary”设为“mouse”的符号链接(symbolic link)不是一个选项,因为“mary”存在于“mouse”之前。
感谢任何解决我问题的帮助/想法。
最佳答案
是的,默认行为是不一致的。您可以使用 symlinks
设置来控制其中的一些;例如:
set symlinks=chase
将使 tcsh
在使用 cd
后进入“真实”目录,这就是你想要的(我认为)。
还有 expand
和 ignore
设置。引用 tcsh(1)
:
symlinks (+)
Can be set to several different values to control symbolic link
(`symlink') resolution:
If set to `chase', whenever the current directory changes to a
directory containing a symbolic link, it is expanded to the
real name of the directory to which the link points. This does
not work for the user's home directory; this is a bug.
If set to `ignore', the shell tries to construct a current
directory relative to the current directory before the link was
crossed. This means that cding through a symbolic link and
then `cd ..'ing returns one to the original directory. This
affects only builtin commands and filename completion.
If set to `expand', the shell tries to fix symbolic links by
actually expanding arguments which look like path names. This
affects any command, not just builtins. Unfortunately, this
does not work for hard-to-recognize filenames, such as those
embedded in command options. Expansion may be prevented by
quoting. While this setting is usually the most convenient, it
is sometimes misleading and sometimes confusing when it fails
to recognize an argument which should be expanded. A compro‐
mise is to use `ignore' and use the editor command normalize-
path (bound by default to ^X-n) when necessary.
关于linux - tcsh:ls vs pwd vs cd,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39342889/
我尝试按照这些说明返回到前一个目录,但结果是“-bash CD:OLDPWD未设置”。。。我怎么能做我想做的事呢?。谢谢。
我认为在 IPython 中使用 ! 前缀的 shell 命令会使系统 shell 实际执行该命令,但似乎并非如此。考虑以下情况,我从 /home/Documents/Rx 开始,启动 IPython
Closed. This question does not meet Stack Overflow guidelines。它当前不接受答案。 想改善这个问题吗?更新问题,以便将其作为on-topic
有些 Live CD 可以启动操作系统并允许您无需安装即可使用它。 我想知道是否有一种简单的方法来自定义 Live CD,以便它只加载运行一个应用程序所需的内容,然后运行该应用程序。 最佳答案 对于
当我从 Live CD 启动 Linux Mint 时,我能够将文件保存到“文件系统”。但这些文件保存在哪里呢?不可能是光盘,因为它是 CDR。我不认为它存储在 RAM 中,因为它只能保存这么多数据,
创建了以下类,暂时没有接口(interface)/抽象类: 测试 - 用于创建测试数据 音乐 - 应存储所有 CD CD - 应存储艺术家和 CD 标题 + 所有歌曲 艺术家 - 仅包含字符串名称 歌
在 Git 提交和推送之后,Go 管道有时需要一段时间才能启动。即使在手动按下开始按钮后,也可能需要很长时间。有没有一种设置或方法可以让它更快地获取更改并更快地启动?我不介意它是否在服务器上使用更多资
这可能吗? 我的第一个猜测是: C:> Get-WmiObject Win32_CDROMDrive 但是当我尝试这个时,它只告诉我 Caption , Drive , Manufacturer ,
我正在运行 gitlab 作业,在作业中我试图取消设置在 CI/CD 设置中的某些变量。 例如,我有SOME_VARIABLE设置为 然后,在工作定义中,我正在尝试 variables: SOM
我遇到的问题是 cd不在窗口节点中工作: node("Window-node") { stage('unstash'){ echo
我尝试关注these instructions返回到上一个目录,但这会导致“-bash cd: OLDPWD not set”。 我怎样才能做我想做的事? 谢谢。 最佳答案 我也遇到了同样的问题。为
我在postgresql有点情况 我有两个表 t1 和 t2,并且都有一个列具有相同类型的数据“col_data”,col_data 可能只有以下数据 ('ab', 'cd', 'ab,cd', 'c
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a softwar
我如何在 PowerShell 中编写函数或别名命令,以便 cd 可以做两件事: cd 给定的目录 ls 目录内容 编辑: 我需要的是这个: function ccd { param($pat
我有一个表格,其中填充了某些值,例如 | CODE | NAME | NB: THIS IS A VERY BASIC EXAMPLE | zygnc | oscar alpha |
所以表结构是这样的 CD id | Artist id 我想返回在此表中多次出现的艺术家,例如不止一张 CD。 我使用的是 Mysql,那么执行此操
This question already has answers here: Reference - What does this regex mean?
如果我们使用 cd bin,我们应该能够导航到 bin 文件夹。 那么bin目录前使用$的目的是什么?“cd $bin_dir” 请解释一下 最佳答案 $bin_dir 是环境变量(请阅读此处了解更多
我正在使用express generator 。运行生成器后,它输出以下内容: install dependencies: $ cd . && npm install cd .有什么意
我有一个旧程序可以从磁盘读取/翻录 CD/音乐数据。它是一个自定义程序,可以读取轨道数据并将其转换为 wma/wpa/wav 格式。然后用户输入如何获得许可,程序将数据和音乐文件提取到我们的 LAN。
我是一名优秀的程序员,十分优秀!