tcsh PATH 环境变量不受亚马逊网络服务尊重

tcsh PATH 环境变量不受亚马逊网络服务尊重

我有一个带有 64 位 Linux AMI 的 Amazon EC2 实例。我将 shell 更改为 tcsh,然后使用以下命令设置 .tcshrc

PATH = ".:/usr/local/lib/play-1.1:$PATH"

之后

$ source ~/.tcshrc
$ echo $PATH
/usr/local/lib/play-1.1:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin

我不能把任何东西放到我的路径上并让它因为某种原因被捡起。

我也尝试了别名:

$ ln -s /usr/local/lib/play-1.1/play /usr/local/bin/play
$ play
play: command not found

结果相同,它没有在我的路径中被拾取。我是否不了解某些全局配置?我的经验是使用 CentOS,所以这对我来说很奇怪。

/home/notbrain
notbrain@aws-dev1: echo $PATH
.:/usr/local/lib/play-1.1:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin

/home/notbrain
notbrain@aws-dev1: ls /usr/local/bin
total 8.0K
4.0K drwxr-xr-x  2 root 4.0K Jan 28 05:41 ./
4.0K drwxr-xr-x 13 root 4.0K Jan 11 21:44 ../
   0 lrwxrwxrwx  1 root   28 Jan 28 05:41 play -> /usr/local/lib/play-1.1/play*

/home/notbrain
notbrain@aws-dev1: play
play: Command not found.

/home/notbrain
notbrain@aws-dev1: sudo play
sudo: play: command not found

/home/notbrain
notbrain@aws-dev1: /usr/local/bin/play
~        _            _
~  _ __ | | __ _ _  _| |
~ | '_ \| |/ _' | || |_|
~ |  __/|_|\____|\__ (_)
~ |_|            |__/
~
~ play! 1.1, http://www.playframework.org
~
~ Usage: play cmd [app_path] [--options]
~
~ with,  new      Create a new application
~        run      Run the application in the current shell
~        help     Show play help
~

/home/notbrain
notbrain@aws-dev1:

谢谢,

布赖恩

答案1

对于 tcsh 或 csh:

set PATH = (. /usr/local/lib/play-1.1 $PATH) 

相关内容