Register • FAQ • Memberlist • Usergroups • Tutorials Point • Log in

| Page 1 of 1

Help needed to code same like a ls-lR in unix
Author | Message
--- | ---
nawang81 Joined: 01 Jan 2010 Posts: 1 | Help needed to code same like a ls-lR in unix Task You are required to write a C program under linux that produces the same output as ls –lR <pathname>. without the group gid of each file.
Your program must either have the following program structure, or if you have chosen a different structure, a detailed explanation of why you have chosen this structure.
A note on programming style
Programs should be decomposed into functions, and a function should do only one thing
Print more file details. the function calling hierarchy should be
main(int argc, char **argv) //only checks arguments
recls(“.”) //that contains the stat buffer
lsdetails(struct stat *statbuff)
time(time_t time) //might need a new name
perms(mode_t mode)
hlinks(nlink_t, linkbit)
slink(mode_t, mode)
owner(uid_t owner)
type(mode_t mode)
your program should be readable and understandable without needing comments. You should construct a suitable file structure to test your program.
Fri Jan 01, 2010 11:06 pm |

Display posts from previous: |

| Page 1 of 1

You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum

Powered by phpBB © phpBB Group Design by Vjacheslav Trushkin for phpBBStyles.com