简体   繁体   中英

Symbolic links in MacOSX with scripts

I have a script in one folder, that at the same time uses other executables at the same folder.

For example, in ~/scripts/ :

myscript:

./mybinfile argument

And I want to make a symbolic link to the script (to ~/bin/ ). But if I use ln -s abs_path_to/myscript ~/bin/myscript , it tries to search mybinfile in ~/bin , not in ~/scripts . I do not want to add nothing to my $PATH . How can I make the script to look . in ~/scripts ? Thank you in advance.

为什么在生成符号链接时不使用完整路径?

ln -s ~/scripts/myscript ~/bin/myscript

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM