Solved

exporting file from linux file system to my own file system

Posted on 2004-04-01
11
231 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

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Downgrade centos 6.5 to 6.4? 7 1,053
Trying to use two loops in a perl script but not getting results need. 10 93
Problem to telnet 23 166
Help with Ubuntu 14.04 LTS 10 137
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
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…

820 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