无法访问(列出)git-bash.exe中的现有目录?

时间:2015-11-06 11:40:52

标签: windows bash shell directory msys

我正在使用Windows 2008下的git-bash.exe解压缩Java文件,然后我进入了以下状态:

myUSER@myPC MINGW32 /z/myUSER/Downloads/jdk1.6.0_45_x64
$ ls -la
total 78848
drwxr-xr-x 1 myUSER 1610613249        0 Nov  6 12:16 ./
drwxr-xr-x 1 myUSER 1610613249        0 Nov  6 11:23 ../
drwxr-xr-x 1 myUSER 1610613249        0 Nov  6 12:11 jdk1.6.0_45-x64/
drwxr-xr-x 1 myUSER 1610613249        0 Nov  6 11:59 cab_unpack/
-rw-r--r-- 1 myUSER 1610613249   526848 Nov  6 11:09 jdk1.6.0_45.msi
drwxr-xr-x 1 myUSER 1610613249        0 Nov  6 12:16 jre6-x64/
-rw-r--r-- 1 myUSER 1610613249       36 Nov  6 11:10 sb160450.cab
drwxr-xr-x 1 myUSER 1610613249        0 Nov  6 11:30 sj160450/
-rw-r--r-- 1 myUSER 1610613249 14582180 Nov  6 11:10 sj160450.cab
drwxr-xr-x 1 myUSER 1610613249        0 Nov  6 11:30 sp160450/
-rw-r--r-- 1 myUSER 1610613249    36465 Nov  6 11:10 sp160450.cab
drwxr-xr-x 1 myUSER 1610613249        0 Nov  6 11:30 sr160450/
-rw-r--r-- 1 myUSER 1610613249   130177 Nov  6 11:10 sr160450.cab
drwxr-xr-x 1 myUSER 1610613249        0 Nov  6 11:31 ss160450/
-rw-r--r-- 1 myUSER 1610613249 17633708 Nov  6 11:09 ss160450.cab
drwxr-xr-x 1 myUSER 1610613249        0 Nov  6 11:31 st160450/
-rw-r--r-- 1 myUSER 1610613249 29826950 Nov  6 11:10 st160450.cab
drwxr-xr-x 1 myUSER 1610613249        0 Nov  6 11:31 sz160450/
-rw-r--r-- 1 myUSER 1610613249     1638 Nov  6 11:10 sz160450.cab
drwxr-xr-x 1 myUSER 1610613249        0 Nov  6 11:50 uni-jdk1.6.0_45/

请注意首先列出的目录jdk1.6.0_45-x64如何?我手动创建了一个...但是,现在当我尝试访问它(cd或者列出它时):

myUSER@myPC MINGW32 /z/myUSER/Downloads/jdk1.6.0_45_x64
$ cd jdk1.6.0_45-x64
bash: cd: jdk1.6.0_45-x64: No such file or directory

myUSER@myPC MINGW32 /z/myUSER/Downloads/jdk1.6.0_45_x64
$ ls jdk1.6.0_45-x64
ls: cannot access jdk1.6.0_45-x64: No such file or directory

......就好像它不在那里?? !!我对这个目录中的其他子目录没有问题,要么?? !!有趣的是,这个目录在Windows资源管理器中显示 - 并在globbing下显示:

myUSER@myPC MINGW32 /z/myUSER/Downloads/jdk1.6.0_45_x64
$ for ix in *; do echo $ix; done
jdk1.6.0_45-x64
cab_unpack
jdk1.6.0_45.msi
jre6-x64
sb160450.cab
sj160450
sj160450.cab
sp160450
sp160450.cab
sr160450
sr160450.cab
ss160450
ss160450.cab
st160450
st160450.cab
sz160450
sz160450.cab
uni-jdk1.6.0_45

...但不是当我做 TAB 完成时:

$ ls jTAB
jdk1.6.0_45.msi  jre6-x64/

这怎么可能 - ls -la .可以列出这个目录 - 但ls,目录名作为参数,是不可访问的?如何从git-bash.exe终端访问此目录?

如果相关,则版本为:

myUSER@myPC MINGW32 /z/myUSER/Downloads/jdk1.6.0_45_x64
$ bash --version
GNU bash, version 4.3.42(2)-release (i686-pc-msys) ...

...通过PortableGit-2.5.3-32-bit.7z.exe安装 - 我认为此git-bash.exe提供了msys2个环境......

0 个答案:

没有答案