Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I have been reading for several hours. Im not getting anywhere... well Im not getting there fast enough. so I thought I would ask the experts
I need to list and count directorys in root. this is part of a class im taking. I dont know scripting much at all. well not at all. still I need the out put to look like this
the root directory on "hostname" has "some number" directorys
#then list the directroys like this, or close to it.
2048 r-x 2 14:26 bin
512 r-x 2 15:59 bsd-src
3072 r-x 3 14:45 dev
and so on.
with ls -gko / I get some of what I need. but I need some hints/help with the rest.
ls -gko /
drxwr-xr-x 3 4 feb 2 2010 bin
drxwr-xr-x 3 4 feb 2 2010 boot
and for some reason, adding the -d option that I think should be giving me only directorys is giving me this one line.
drxwr-xr-x 33 4 Jan 3 13:46 /
help wanted
thanks
2. Relevant commands, code, scripts, algorithms:
I have been trying to use ls - options just to get the fields right but I understnad I will need to use
ls
echo
cd
and regular expressions.
3. The attempts at a solution (include all code and scripts):
Im posting this from windows and I cant get all the attemps from my linux machine to here. I can if I really have to but I think you can see I have been working on this problem for about 2 days now. Im just not good at c yet and this seem like a rather advanced problem for a intro to unix course.
4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
school = pima.edu
intro to unix =CSI137
instructor is B. Tucker
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).