Thursday, March 05, 2009

EXECV

When U use system(), it will help U extract the * or wildcard to the current file.
So such as tar will run sucessuflly.

If U use the execv(), it will just run the arg which u give.

Sample.
/father.c mother.c son.c daughter.c

system("ls *") ==> ls father.c mother.c son.c daughter.c
execv( "ls", argv[]") ===> ls *

It's funny, but thanks shell help us extract wild card.

Labels: ,


Comments: Post a Comment

Subscribe to Post Comments [Atom]





<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]

Scrape It
Free Hit Counters
Scrape It