LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-06-2013, 12:24 AM   #1
aditya9
LQ Newbie
 
Registered: Nov 2013
Posts: 2

Rep: Reputation: Disabled
directory backup program in C


Hi, i'm trying to make a directory backup program in C without using any system call.I'm able to read the "SOURCE" directory contents(it's subfolders and different types of files) but don't know to create the same directory in "DESTINATION". If anybody can kindly reply. It's an urgent task for me and i'm stuck midway.
 
Old 11-06-2013, 02:21 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,133

Rep: Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272
would be nice to explain how do you want to implement anything without system calls. (does it mean to avoid the system() call itself or any call to the system).
Actually mkdir should work, it will create the destination dir, but it is a system call too....


What have you implemented?
 
Old 11-08-2013, 11:27 PM   #3
aditya9
LQ Newbie
 
Registered: Nov 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
would be nice to explain how do you want to implement anything without system calls. (does it mean to avoid the system() call itself or any call to the system).
Actually mkdir should work, it will create the destination dir, but it is a system call too....


What have you implemented?

Exactly...i've to avoid system() . Any other function is allowed like mkdir() , chdir() etc. First i've to recursively read a directory and it's contents and then copy the same in destination directory in the same format as of source directory.
 
Old 11-09-2013, 02:52 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,133

Rep: Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272
here you can find some tips (for example): http://stackoverflow.com/questions/2...n-unix-using-c
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tar backup of an XP directory fof3 Linux - Newbie 2 03-31-2007 04:39 PM
Backup program keep thort Linux - Newbie 2 07-08-2006 07:28 AM
Backup of directory sanjibgupta Linux - Networking 2 09-05-2005 01:32 AM
Backup program? muah Linux - Software 2 08-28-2003 11:27 AM
Backup - what program is best? pix Linux - Newbie 2 07-15-2003 10:06 PM


All times are GMT -5. The time now is 03:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration