Solved

exporting file from linux file system to my own file system

Posted on 2004-04-01
11
228 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:achille67
Comment Utility
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
Comment Utility
hi modulo,
I just email you

thanks
0
 

Author Comment

by:achille67
Comment Utility
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
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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 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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now