How to write a c program to copy the directory from one destination to other ....Without using the system() function...in linux...
How to write a c program to copy the directory from one destination to other ....Without using the system() function...in linux...
Well you could start with reading the manual pages for
- opendir
- readdir
- closedir
Then for copying files, it would be
- fopen
- fread
- fwrite
- fclose
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
If you're feeling too lazy to write that yourself, you could check out the source for you system's cp utility. Possibly make a library version of it for use from your program.