gordonyb0
June 6th, 2006, 04:25 AM
Wow,Here i have a question
I use execl() to display the result of "ps -l",but i don't want it to be shown in the stdout but in a file call "temp" instead.
i try to write like execl("/bin/ps","ps","-l",">","$HOME/temp",(char *)0);
It doesn't work.
so,is there any other function which can solve my problem? Pls tell me.:confused:
I use execl() to display the result of "ps -l",but i don't want it to be shown in the stdout but in a file call "temp" instead.
i try to write like execl("/bin/ps","ps","-l",">","$HOME/temp",(char *)0);
It doesn't work.
so,is there any other function which can solve my problem? Pls tell me.:confused: