Linux Programming/C Programming


Implement the ls command using the stat kernel function. The program should work as follows:

1. Capture the long and short options specified using getopt_long (7 marks)

2. Verify that your program is able to correctly capture all options. (3 marks)

3. Process each of the non-flag related arguments as if they are files in a subroutine - the pattern should be similar to the example used in the demos of the cat command.

4. For any file that fails to stat use perror to report on the problem – and make sure that this feature is tested. (15 marks – note that there are 19 marks available)

5. If there are no non-flag related arguments, process the entire current directory. (5)

6. Create a bash script containing a suite of test commands for your program. Explain your test strategy. (5 marks)

7. Include a commented program listing, sample output and a status report describing which features work, do not work fully (describe your problem) or do not work at all.

The standard flags you should capture are the following:

a) –a --all (1)

b) –i (1)

c) –L (1)

d) –s --size (1)

e) –F --classify (2)

Capture the following new flags that were designed for this assignment

f) –P octal | symbolic display the file permissions either as octal or symbolic (3)

g) --minSize nnn do not display files that are smaller than nnn bytes (1)

h) - -maxSize nnn do not display files that are larger than nnn bytes (1)

i) – time ctime | mtime | atime display the time specified. Note that the - - time

flag can appear multiply so that all times are

shown. (2)

j) -g show the group number in decimal (1)

k) - - group show the group name (2)

l) -u show the userid as a number (1)

m) - - author show the users’s real name (ie: James Bond) (2)

n) –n show the number of hard links (1)

Note: Unlike the real ls, if a file is a directory you do not have to show it’s contents. Nor are we asking for the -l (long) option which would display most fields. Your routine do¬¬¬_ls will consist mostly of if statements – if the option is present then display the feature. The minSize and maxSize features should be tested first. If the file is too big or too small then simply return right away, displaying noting.

Skills: C# Programming, C++ Programming, Linux, UNIX

See more: the p.i.c. group, symbolic programming, strategy pattern example, strategy pattern, stat problem, stat c, standard programming, sample problem statements, report programming, programming process, problem statements example, problem statements, pattern strategy, james m fields, is programming hard, if c programming, f sharp programming, f# programming, example of assignment problem, d programming, c stat, c sharp test, c # sharp test, c++ programming test, c++ programming problem

Project ID: #5425235

11 freelancers are bidding on average $91 for this job


Hi there, I have over 7 years experience working on HTML, Wordpress, Magento, Database administration, OpenCart, Website Design, Logo / Banner Design Joomla, CSS and Linux Administration. I have read the project descri More

$53 CAD in 1 day
(267 Reviews)

Hello there, I can help you with this project. I have lots of experience with Linux programming. Please check out my profile for reviews on other jobs I've finished, and contact me if you are interested. Looki More

$79 CAD in 1 day
(31 Reviews)

Hi! I have lots of experience doing similar assignments on this website. Please contact me for further discussion. Thanks

$45 CAD in 1 day
(3 Reviews)

As a Linux professional with 4+ years of industrial experience with good knowledge in C programming, Linux System programming, Data Structures and underlying Linux Kernel provokes me to bid for this project. Please More

$30 CAD in 5 days
(2 Reviews)

A proposal has not yet been provided

$83 CAD in 3 days
(2 Reviews)

A proposal has not yet been provided

$45 CAD in 1 day
(1 Review)

Hi. I am an expert in C/C++ and Linux programming. I got all your requirements. Let me help you do this project. Thank you so much for your attention.

$35 CAD in 7 days
(1 Review)

I'm a long time Linux user and also a Computer Science undergraduate who just completed a very similar task for a college project less than a week ago.

$30 CAD in 1 day
(1 Review)

I have done something like this before, so I have sort of previous experience with this. I have a good understanding on shell scripting and C.

$25 CAD in 2 days
(0 Reviews)

I have a lot of experience in C programming using Linux system functions, as well as processing CLI arguments, short and log options. I believe I can complete your project quickly and effectively. This is actually m More

$35 CAD in 4 days
(0 Reviews)

A proposal has not yet been provided

$587 CAD in 9 days
(0 Reviews)

Dear Thank you for your posting. I'm very interested in your job post. I can do this project And I am available to chat by email or Skype. I hope work with you. Please check my skill and Hire me please. R More

$360 CAD in 5 days
(0 Reviews)

Hi I am an Electronics engineer from pune, India. Kow linux and C. Can deliver the task on time. Also I work full-time.Thanks

$45 CAD in 1 day
(0 Reviews)

Hi I can help you for this project. Give me a chance. I have 2.5 years of exp in this field. Thanks Nikhil

$25 CAD in 1 day
(0 Reviews)