首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > UNIXLINUX >

linux shell之浪头号扩展

2013-09-15 
linux shell之波浪号扩展在linux shell下面,~和当前user的home目录是等效的,在linux shell下,波浪号总是被

linux shell之波浪号扩展

在linux shell下面,~和当前user的home目录是等效的,
在linux shell下,波浪号总是被自动扩展成当前user的home目录。
sh-# echo $HOME
/
sh-# mkdir /my_home
sh-# export HOME=/my_home/
sh-# echo $HOME
/my_home/
sh-# cd ~
sh-# pwd
/my_home
sh-# cd /
sh-# ls ~
sh-# touch /my_home/test_file
sh-# ls ~
test_file

待解决问题:
user的home目录是如何预设的?

2楼boyxulin19865天前 19:29
自己必须顶自己
1楼boyxulin19865天前 19:28
以后凡是没明白的问题都以待解决问题明确的标注出来,等找到答案后再补上去。

热点排行