Search code examples
cunixdirectorycopyutility

How to create a new subdirectory and copy files into it? (C utility in Unix)


I'm making a utility in C under Unix. What functions would allow me to:

a) make a directory

b) copy a file into it

Can someone let me know what would work here or point me towards some documentation?


Solution

  • a) make a directory

    The mkdir library method

    b) copy a file into it

    The fopen, fread, fwrite and fclose methods.

    ... point me towards some documentation?

    The first place to look is section 3 of the online manual; e.g. man 3 mkdir.