C# 是什么导致这些目录被隐藏?
我有以下程序:C# 是什么导致这些目录被隐藏?,c#,linux,docker,asp.net-core,C#,Linux,Docker,Asp.net Core,我有以下程序: public class Program { public void Main(string[] args) { var dir = args[0]; foreach (var file in Directory.GetDirectories(dir)) Console.WriteLine(file); } } 我把它放在docker容器中,在debian机器上执行,就像这样 docker run
public class Program
{
public void Main(string[] args)
{
var dir = args[0];
foreach (var file in Directory.GetDirectories(dir))
Console.WriteLine(file);
}
}
我把它放在docker容器中,在debian机器上执行,就像这样
docker run test /lib
结果是:
/lib/firmware
/lib/hdparm
/lib/init
/lib/lsb
/lib/modprobe.d
/lib/systemd
/lib/terminfo
/lib/udev
/lib/x86_64-linux-gnu
但是,这不是/lib
中的所有目录。我认为权限问题阻止了某些条目不显示,但运行ls-pl | grep'/'
会导致以下结果:
lrwxrwxrwx 1 root root 21 Feb 2 2014 cpp -> /etc/alternatives/cpp
drwxr-xr-x 2 root root 4096 Sep 12 13:35 discover/
drwxr-xr-x 11 root root 4096 Sep 12 14:49 firmware/
drwxr-xr-x 2 root root 4096 Sep 12 13:35 hdparm/
drwxr-xr-x 2 root root 4096 Sep 12 13:34 ifupdown/
drwxr-xr-x 2 root root 4096 Sep 12 14:47 init/
drwxr-xr-x 3 root root 4096 Sep 12 13:33 lsb/
drwxr-xr-x 2 root root 4096 Sep 12 13:33 modprobe.d/
drwxr-xr-x 5 root root 4096 Sep 12 13:49 modules/
drwxr-xr-x 2 root root 4096 Sep 12 13:34 modules-load.d/
drwxr-xr-x 2 root root 4096 Sep 12 13:46 startpar/
drwxr-xr-x 8 root root 4096 Sep 12 13:47 systemd/
drwxr-xr-x 2 root root 4096 Sep 12 13:47 sysvinit/
drwxr-xr-x 15 root root 4096 Feb 1 2014 terminfo/
drwxr-xr-x 4 root root 4096 Sep 12 13:50 udev/
drwxr-xr-x 3 root root 12288 Sep 18 22:07 x86_64-linux-gnu/
drwxr-xr-x 2 root root 20480 Sep 12 13:49 xtables/
如何让原始程序列出所有目录,如ls
does?我是否使用另一个命令来确定显示的目录与未显示的目录之间的区别
DockerFile
FROM microsoft/aspnet:1.0.0-beta7
ADD . /app
WORKDIR /app
ENTRYPOINT ["./ConsoleTest"]
它会帮助你查看你的Dockerfile,或者有一些更多的信息,比如一个复制者。它会帮助你查看你的Dockerfile,或者有一些更多的信息,比如一个复制者