Write a single-file c program

Assignment Help C/C++ Programming
Reference no: EM131277468

System Programming - Programming Assignment

Topics: Low-Level Files in C.

For this assignment, you need only write a single-file C program.

Your program will:
- Obtain the following (in order) from the command line:
- A mode argument:
- -c create a new archive file
- -cr create recursive a new archive file
- -e explode an existing archive file
- A path argument:
- Specifies the directory (as either a relative path to the current working directory or an absolute path) that contains the files to be archived ( -c -cr ) or to serve as the root of the exploded archive ( -e )
- A file argument:
- Specifies the name of the archive file that is to be created / or added to. Note: by default this file will be in the current working directory, however by pre-pending a path this file can/could be anywhere you wish.

- Based on the command line arguments does one of the following:
- Create: Create a new archive file ( file ) that, for each regular (non-hidden) file in the directory specified by ( path ), contains the data required to restore the file's:
- Name
- Data
- Access Permissions

- Create Recursive: same as Create, but you also recurse into each sub-directory
(Note: Do Not recurse into . or .. )

- Explode: Create a regular file in the directory specified by ( path ), for each archived file in the archive file ( file ), such that it has the same name, access permission and is an exact copy of the original file that was archived.

- If you are looking for more fun ... consider (any combination of):
- Encrypt the files as you write them into the archive
- Compress the files as you write them into the archive

- Proper care (error reporting / program termination) when opening, creating, files and directories is required.

Sample Runs:
% ./archive -c . my_archive
archiving .
Done - my_archive as been created

% ./archive -cr ./classes my_archive
archiving ./classes
archiving ./classes/CS351
archiving ./classes/CS351/Progs
archiving ./classes/CS317
Done - my_archive as been created

% ./archive -e ./explode_test my_archive
exploding to ./explode_test
Done - my_archive as been exploded

Reference no: EM131277468

Questions Cloud

What is the vertical force that each bolt must carry : The container is vented at the top. If eight bolts are symmetrically located around the circumference, what is the vertical force that each bolt must carry?
Identify different types of intentional respondent error : Identify different types of intentional respondent error and the controls used to minimize them.- Identify different types of unintentional respondent error and the controls used to minimize them.
Why is it necessary to perform preliminary screening : Why is it necessary to perform preliminary screening of a dataset?-  Identify five different problems that a researcher might find while screening a dataset.
In what ways is the message important to anne brown : What information does my audience need about the topic? How much formality is necessary in this message to Anne Brown? In what ways is this message important to Anne Brown?
Write a single-file c program : CS337 System Programming - For this assignment, you need only write a single-file C program and Create a new archive file ( file ) that, for each regular (non-hidden) file in the directory specified by ( path ), contains the data required to restor..
Determine the maximum depth of water possible : Determine the maximum depth of water possible without the wall tipping over. The wall simply rests on the ground without being anchored to it.
Should acme use a professional field data collection company : Acme Refrigerant Reclamation Company performs large-scale reclamation of contaminated refrigerants.- Should Acme use a professional field data collection company to gather the data? Why or why not?
What kind of evidence do they bring to support their view : What kind of evidence do they bring to support their viewpoint? Is it adequate? How clear is the argument? Does it flow logically? Are there gaps, inconsistencies, or contradictions in the discussion or argument?
Find the magnitude and location of the resultant fluid force : An open rectangular tank is 2 m wide and 4 m long. The tank contains water to a depth of 2 m and oil (SG = 0.8) on top of the water to a depth of 1 m. Determine the magnitude and location of the resultant fluid force acting on one end of the tank.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd