programming assisnment | Write My Homework

Write a command-line program to determine file type under Unix
When running your program with a file name as the input parameter, it should return the type of the file, such as ‘text file’, ‘executable file’, ‘C source code’, etc.
As we discussed in class, there are four possible ways to determine the type of a file:
Comparing the file extension to a list of known extensions;
By reading the first byte of the file and comparing it to a list of existing magic code;
Examining the return from a stat() system call;
For text files, read the contents of the file and try to figure it out;
For the purpose of this homework, you don’t have to implement all of the above four. Two will suffice. Any file that can’t be recognized should show ‘unknown type’.
Submit your source code and a test run result (either a ‘script’ file, or a screenshot).

Don't use plagiarized sources. Get Your Custom Essay on
programming assisnment | Write My Homework
Just from $13/Page
Order Essay
superadmin

Recent Posts

I need reference for internet marketing | Write My Homework

internet marketing internet marketing internet marketing internet marketing internet marketing internet marketing internet marketing internet…

3 years ago

How to fix Sage 50 Upgrade Error | Write My Homework

Sage 50 is a bookkeeping programming which was sent off by Sage Group. Sage is…

3 years ago

R lab- finding mean and median | Write My Homework

The first part is basically downloading everything in R lab ( It's just 3 points)…

3 years ago

Strategy Management: Poter’s Approach to industry analysis | Write My Homework

Assignment Question(s): Discussion questions Critical thinking How can a decision maker identify strategic factors in…

3 years ago

financial statement | Write My Homework

1. Pro-Forma Statement Using the Proforma Income Statement template attached and located in the Course…

3 years ago