【问题标题】:Getting stat (ls or cp) of hidden files获取隐藏文件的统计信息(ls 或 cp)
【发布时间】:2020-05-02 19:09:41
【问题描述】:

我有一个文件夹,其中包含一个受源代码控制的.tmux.conf 文件,我想将该文件复制到~。这是其中的ls

ubuntu@ip-172-180:~$ ls -alh .vim/others
total 12K
drwxrwxr-x 2 ubuntu ubuntu 4.0K May  2 19:05 .
drwxrwxr-x 6 ubuntu ubuntu 4.0K May  2 19:05 ..
-rw-rw-r-- 1 ubuntu ubuntu  706 May  2 19:05 .tmux.conf

但是,当我在该目录上执行 ls 时,我什么也得不到:

ubuntu@ip-172-30-1-180:~$ ls .vim/others/*
ls: cannot access '.vim/others/*': No such file or directory

cp相同:

ubuntu@ip-172-30-1-180:~$ cp .vim/others/* .
cp: cannot stat '.vim/others/*': No such file or directory

复制点文件时是否需要添加一些额外的参数?

【问题讨论】:

标签: linux unix dotfiles


【解决方案1】:

检查这个命令

ls -ld .[!.]*

ls -ld .vim/others/[!.]*

【讨论】:

    猜你喜欢
    • 2020-02-04
    • 2011-05-21
    • 1970-01-01
    • 2022-09-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多