如何在pwd中运行c可执行文件,而可执行文件位于其他目录中 [英] How can I run a c executable in pwd ,while the executable is in some other directory
问题描述
大家好,我是这个论坛的新手。
任何人都可以告诉我 - 如何在某些
目录中运行ac可执行文件,虽然可执行文件位于其他目录中
我是unix和c的新手,所以任何帮助指针都会有很好的价值。
提前预付款。
vish
Hi guys , I am new to this forum .
can anybody plz tell me - "how can I run a c executable in some
directory ,while the executable is in some other directory "
I am new to unix and c ,so any pointers for help will be of great
value.
thanx in advance .
vish
推荐答案
vi******@gmail.com 写道:
大家好,我是这个论坛的新手。
任何人都可以告诉我 - 我怎么能在某些地方运行ac可执行文件
目录,而可执行文件在其他目录中
我是unix和c的新手,所以任何帮助指针都会很棒
值。
提前预付款。
vish
Hi guys , I am new to this forum .
can anybody plz tell me - "how can I run a c executable in some
directory ,while the executable is in some other directory "
I am new to unix and c ,so any pointers for help will be of great
value.
thanx in advance .
vish
你可以将你的密码切换到你希望它在
teminal.Then输入可执行文件的执行路径。
另一种方法是通过系统调用exec(cmd,env)执行它)。
您可以通过表格param
" env"给出新流程的环境。
You can switch your pwd to the directory you want it to be in the
teminal.Then enter the executable''s path to exec it.
Another method is to execute it through a system call "exec(cmd,env)".
You can give the environment of the new process by the form param
"env".
你试过这个,实际上我正在使用sun solaris,并且不知道它不起作用,它是某种settin,我是missin。
tinysisi写道:
ya i tried doin this, actually i m usin sun solaris ,and dont know y
its not workin , is it some sort of settin , i m missin .
tinysisi wrote:
vi ****** @ gmail.com 写道:
大家好,我是这个论坛的新手。
可以任何人plz告诉我 - 如何在某些
目录中运行ac可执行文件,而可执行文件在某个其他目录中
我是unix的新手和c,所以任何帮助指针都会很有价值。
提前预付款。
vish
Hi guys , I am new to this forum .
can anybody plz tell me - "how can I run a c executable in some
directory ,while the executable is in some other directory "
I am new to unix and c ,so any pointers for help will be of great
value.
thanx in advance .
vish
你可以将你的密码切换到你希望它在
teminal中的目录。然后输入可执行文件执行它的路径。
另一种方法是通过系统调用exec(cmd,env)执行它。
你可以通过表格param
" env"来提供新流程的环境。
You can switch your pwd to the directory you want it to be in the
teminal.Then enter the executable''s path to exec it.
Another method is to execute it through a system call "exec(cmd,env)".
You can give the environment of the new process by the form param
"env".
vi******@gmail.com 写道:
任何人都可以告诉我 - 如何在某些
目录中运行ac可执行文件,而可执行文件位于其他目录中
我是unix和c的新手,因此任何有关帮助的指针都将是非常好的
值。
can anybody plz tell me - "how can I run a c executable in some
directory ,while the executable is in some other directory "
I am new to unix and c ,so any pointers for help will be of great
value.
这真的不是C问题。试试comp.unix.questions。
-
Keith Thompson(The_Other_Keith) ks *** @ mib.org < http://www.ghoti.net/~kst>
圣地亚哥超级计算机中心< *< http://用户.sdsc.edu / ~kst>
我们必须做点什么。这是事情。因此,我们必须这样做。
This really isn''t a C question. Try comp.unix.questions.
--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
这篇关于如何在pwd中运行c可执行文件,而可执行文件位于其他目录中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!