终端命令问题

Wine、Cedega、CrossOver 等配置
回复
头像
shenyuzhou
帖子: 280
注册时间: 2011-09-22 14:28

终端命令问题

#1

帖子 shenyuzhou » 2011-11-07 17:09

root@shen-VirtualBox:/var/cache/apt/archives# ls
awesome_3.4.5-1_i386.deb libxcb-shape0_1.6-1_i386.deb
libev3_1%3a3.9-1_i386.deb libxcb-xinerama0_1.6-1_i386.deb
libgif4_4.1.6-9_i386.deb libxcb-xtest0_1.6-1_i386.deb
libid3tag0_0.15.1b-10build2_i386.deb libxdg-basedir1_1.0.2-1_i386.deb
libimlib2_1.4.2-8_i386.deb lock
libxcb-icccm1_0.3.6-1build1_i386.deb menu_2.1.44ubuntu1_i386.deb
libxcb-image0_0.3.6-1build1_i386.deb partial
libxcb-keysyms1_0.3.6-1build1_i386.deb rlwrap_0.37-1_i386.deb
libxcb-property1_0.3.6-1build1_i386.deb sl_3.03-16_i386.deb
libxcb-randr0_1.6-1_i386.deb terminator
libxcb-render-util0_0.3.6-1build1_i386.deb


上面是当前目录的文件

1,=========
可是执行命令结果却不同

root@shen-VirtualBox:/var/cache/apt/archives# ls terminator\ /
libkeybinder0_0.2.2-2_i386.deb terminator_0.95-0ubuntu1_all.deb
python-keybinder_0.2.2-2_i386.deb

下面的却不对?
root@shen-VirtualBox:/var/cache/apt/archives# ls terminator
ls: 无法访问 terminator: 没有那个文件或目录


可是我执行

root@shen-VirtualBox:/var/cache/apt/archives# ls partial/
docbook-xsl_1.75.2+dfsg-5_all.deb
openjdk-6-jre-headless_6b20-1.9.9-0ubuntu1~10.10.2_i386.deb
openoffice.org-writer_1%3a3.2.1-7ubuntu1.1_i386.deb



root@shen-VirtualBox:/var/cache/apt/archives# ls partial
docbook-xsl_1.75.2+dfsg-5_all.deb
openjdk-6-jre-headless_6b20-1.9.9-0ubuntu1~10.10.2_i386.deb
openoffice.org-writer_1%3a3.2.1-7ubuntu1.1_i386.deb


的结果却是相同的,


2,============
ls terminator\ /

ls terminator
的结果为什么不同呢?
(terminator partial都是目录)



root@shen-VirtualBox:/var/cache/apt/archives# ls partial/ \
>


为什么出现>呢
上次由 shenyuzhou 在 2011-11-08 10:21,总共编辑 1 次。
被取胆的活熊已经被关在笼子里长达22年之久。“不能转身,不能站直,不能转身,只有伤与痛。"

抵制养熊场,人类没有伤害动物的权利。。。。。。。。。。。。。
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

Re: 终端命令问题

#2

帖子 eexpress » 2011-11-07 19:59

ls terminator\ /

自己都写了空格。
● 鸣学
头像
shenyuzhou
帖子: 280
注册时间: 2011-09-22 14:28

Re: 终端命令问题

#3

帖子 shenyuzhou » 2011-11-08 9:16

eexpress 写了:ls terminator\ /

自己都写了空格。

我是在ls后面按Tab键时出现的后面的
terminator\ /
被取胆的活熊已经被关在笼子里长达22年之久。“不能转身,不能站直,不能转身,只有伤与痛。"

抵制养熊场,人类没有伤害动物的权利。。。。。。。。。。。。。
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

Re: 终端命令问题

#4

帖子 eexpress » 2011-11-08 9:32

。。。还没明白。说明目录名后面带了空格嘛。必须输入的。
● 鸣学
头像
shenyuzhou
帖子: 280
注册时间: 2011-09-22 14:28

Re: 终端命令问题

#5

帖子 shenyuzhou » 2011-11-08 10:28

1,=========
可是执行命令结果却不同

root@shen-VirtualBox:/var/cache/apt/archives# ls terminator\ /
libkeybinder0_0.2.2-2_i386.deb terminator_0.95-0ubuntu1_all.deb
python-keybinder_0.2.2-2_i386.deb

下面的却不对?
root@shen-VirtualBox:/var/cache/apt/archives# ls terminator
ls: 无法访问 terminator: 没有那个文件或目录

上面的两条命令有什么不同吗?

为什么执行
ls terminator
却没有反应?
被取胆的活熊已经被关在笼子里长达22年之久。“不能转身,不能站直,不能转身,只有伤与痛。"

抵制养熊场,人类没有伤害动物的权利。。。。。。。。。。。。。
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

Re: 终端命令问题

#6

帖子 eexpress » 2011-11-08 10:33

terminator不是目录。terminator\ 才是,或者说"terminator " 才是。
● 鸣学
头像
shenyuzhou
帖子: 280
注册时间: 2011-09-22 14:28

Re: 终端命令问题

#7

帖子 shenyuzhou » 2011-11-08 16:23

eexpress 写了:terminator不是目录。terminator\ 才是,或者说"terminator " 才是。

目录名后面的 \ 号是什么意思?
请这位老师详细说明一下。 :em06
被取胆的活熊已经被关在笼子里长达22年之久。“不能转身,不能站直,不能转身,只有伤与痛。"

抵制养熊场,人类没有伤害动物的权利。。。。。。。。。。。。。
头像
sgsdxzy
帖子: 430
注册时间: 2008-07-19 11:14

Re: 终端命令问题

#8

帖子 sgsdxzy » 2011-11-09 19:56

转义符,说明其后的空格是文件名中的,而非分隔两个参数

比如说
program a\ b 是对文件名为“a b”的一个文件操作
program a b 是对两个名称分别为a和b的文件操作,或者对a文件执行b参数,这要看程序是怎么写的了
头像
shenyuzhou
帖子: 280
注册时间: 2011-09-22 14:28

Re: 终端命令问题

#9

帖子 shenyuzhou » 2011-11-10 10:54

谢谢,知道了,原来 "\ "是表示中间还有个空格的意思。谢谢。
被取胆的活熊已经被关在笼子里长达22年之久。“不能转身,不能站直,不能转身,只有伤与痛。"

抵制养熊场,人类没有伤害动物的权利。。。。。。。。。。。。。
回复