Specifically, ''myls'' is a program that displays


Unix file system programming

write a C program 'myls' that functions like the unix command 'ls'.

Specifically, 'myls' is a program that displays the file list under the current directory. The file list are displayed in different format as commanded by different flags of:

-F: File names are displayed in 5 columns. Each of them are marked according to the type of file of it. Only the following 3 types are required:

'*': for regular executables.

'/': for directories.

'@': for symbolic link.

-l: File names are displayed a row each. Full I-node info are displayed in the way similar to "ls -l" does. However, the path as displayed by "ls -l" can be omitted.

no flag: File names are displayed in the plain format. They are printed in 5 columns of 16-char wide each.

others: An usage message (brief help) is printed.

Reference to the example programs of stat.c and scandir.c for the system calls to retrieve the inode and directory entries info.

You should also consult the manpages of stat, scandir, ls and the related commands and system calls for the detailed description of them. 

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Specifically, ''myls'' is a program that displays
Reference No:- TGS087651

Expected delivery within 24 Hours