Hello i'm a beginner in C and i have a work project to do is to recreate the ls function.
Can someone can help me for do that :
You must develop a program that takes a file name as parameter and displays the following information:
• File name
• File type
• Inode
• Number of hard links
• File size
• Allocated space on hard drive
• Minor (if file is “device”)
• Major (if file is “device”)
• Owner’s UID
• Owner’s GID
#Programming my_ls in C
7 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
!homework
We Don't Do Your Homework
Welcome to Together C & C++ :wave:
We won't do your homework for you (#rules) but we are happy to help you learn and point you in the right direction.
Please send what you have so far and ask a specific question.
use lstat
Hey there Marco.
I'm also very new to C, but I have written a copy of the ls function in Java before.
I do not know explicitly how to walk you through solving such a problem in C specifically, but if you think it would help, I can share the code for my ls function in Java. Maybe it'll spark something??