首页 > 解决方案 > 获取隐藏文件的统计信息(ls 或 cp)

问题描述

我有一个文件夹,其中包含一个.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

复制点文件时我必须添加一些额外的参数吗?

标签: linuxunixdotfiles

解决方案


检查这个命令

ls -ld .[!.]*

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

推荐阅读