How can I obtain list of current working directory--put them into a buffer, say size 1024 bytes, and then print them out on a temp file one per line?
This is my attempt:
char buffer[ 1024 ];
if (( "ls - l", buffer, 1024 ) < 0 )
printf( "ls: %s\n", buffer );