Solved

exporting file from linux file system to my own file system

Posted on 2004-04-01
11
230 Views
Last Modified: 2010-04-22
Hi, Can you help me write the following function?


/*
 * Exports a u_file to linux.
 * Need to take care in the order of modifying the data structures
 * so that it can be revored consistently.
 */
int u_export(char* u_file, char* linux_file)
{
        /*
          write code for exporting a file to linux.
          return 1 for success, 0 for failure

          check ok to open external file for writing

          check userfs file exists

          read the data out of ufs and write it into the external file
        */

        return 0;
}
0
Comment
Question by:achille67
  • 3
  • 2
  • 2
11 Comments
 
LVL 12

Expert Comment

by:stefan73
ID: 10739088
Hi achille67,
What is your intention of "exporting file from linux FS to own FS"? Normally, you'd use FTP, scp, Samba or NFS for this.

Cheers,
Stefan
0
 
LVL 8

Expert Comment

by:da99rmd
ID: 10739117
It still not appropriate to ask homework questions try makeing the function your self and we will try to help you if you have any errors or questions.
/Rob
0
 
LVL 8

Expert Comment

by:da99rmd
ID: 10739118
It still not appropriate to ask homework questions try makeing the function your self and we will try to help you if you have any errors or questions.
/Rob
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

Author Comment

by:achille67
ID: 10743357
I would like to mention that this is not a homework problem, This is just piece of an entire project. i will be glad if you could help out
0
 

Author Comment

by:achille67
ID: 10748138
hi modulo,
I just email you

thanks
0
 

Author Comment

by:achille67
ID: 10753790
Hi everyone,
How could check to see whether a file size > or ==  to some value?
(in C language)
0
 
LVL 12

Accepted Solution

by:
stefan73 earned 125 total points
ID: 10755709
Use the stat() command. It will return you a lot of information about a given inode (file), including its size.

Check "man stat". Be careful that file sizes CAN be >2GB, so always use the off_t data type for file size operations.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question