Linux Programming/C Programming

CLOSED
Bids
14
Avg Bid (CAD)
$106
Project Budget (CAD)
$10 - $30

Project Description:
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 required:
C# Programming, C++ Programming, Linux, UNIX
Hire yavaar19
Project posted by:
yavaar19 Canada
Verified
Public Clarification Board
Bids are hidden by the project creator. Log in as the employer to view bids or to bid on this project.
You will not be able to bid on this project if you are not qualified in one of the job categories. To see your qualifications click here.


$ 53
in 1 days
$ 79
in 1 days
Hire GeorgeKazi
$ 45
in 1 days
$ 30
in 5 days
$ 83
in 3 days
$ 45
in 1 days
Hire thangqn
$ 35
in 7 days
Hire alinp32
$ 30
in 1 days
Hire SorinVisan
$ 25
in 2 days
$ 35
in 4 days