<div dir="ltr">Didn&#39;t go to distribution. <br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Tejas Nadkarni</b> <span dir="ltr">&lt;<a href="mailto:tnadkarn@stevens.edu">tnadkarn@stevens.edu</a>&gt;</span><br>
Date: Sat, Oct 5, 2013 at 2:02 PM<br>Subject: Re: [cs631apue] Some questions on midterm....<br>To: Kai Wang &lt;<a href="mailto:kaikaiw321@gmail.com">kaikaiw321@gmail.com</a>&gt;<br><br><br><div dir="ltr">Thanks, but iterating twice doesn&#39;t seem like a good idea. What if you are calling &#39;ls -lR /&#39; it&#39;s going to traverse every folder and file in the filesystem twice, you&#39;ll be sitting there for a bit before anything happens.<div>

<br></div><div>How will -c and -x override -l? They are different. -c and -x appear to be modifiers of the short format. If you have -l then it will always override the others.</div><div><br></div><div>I&#39;ll play around more with the recursive aspect. Thanks.</div>
<span class="HOEnZb"><font color="#888888">
<div><br></div><div>-Tejas</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Oct 5, 2013 at 1:59 PM, Kai Wang <span dir="ltr">&lt;<a href="mailto:kaikaiw321@gmail.com" target="_blank">kaikaiw321@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear Tejas,<div><br></div><div>- you can iterator all entries twice, first time for maximum column length, then print.</div>

<div><br></div><div>- -d will print all entries of depth 0, e.g. roots of all file tree.</div>
<div><br></div><div>- -c,-x will override -l</div><div><br></div><div>- what fts does is a breadth first scanning, e.g. it visits all depth 0 entires then all depth 1 entries and so on.</div><div>
  if -R is specified, for each depth 0 entry, after fts visited all its depth 1 entries, it will visit every deeper entries till deepest.</div><div><br></div><div>Sincerely,</div><div>Kai</div></div><div class="gmail_extra">


<br><br><div class="gmail_quote">2013/10/5 Tejas Nadkarni <span dir="ltr">&lt;<a href="mailto:tnadkarn@stevens.edu" target="_blank">tnadkarn@stevens.edu</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div>
<div dir="ltr">Jan/All,<div><br></div><div>Some quick questions:</div><div><br></div><div>- How important is variable column width that&#39;s dynamic to the content like the system &#39;ls&#39; implementation does - this is specific to the -l longformat. Is this required and will points be deducted? Mine uses fixed widths which work for nearly every condition but obviously large file sizes will throw it off. Want to check before I invest more time in it</div>



<div><br></div><div>- What is the point of the &#39;-d&#39; flag? When I tried it on the system &#39;ls&#39; it seems to just print out whatever the full pathname of the argument was? i.e. &quot;ls -d /&quot; will just print &quot;/&quot; or &quot;ls -d&quot; will just print &quot;.&quot; or &quot;ls -d ~/&quot; will print the full path of my home directory. Using the -l flag just shows the info of that one entry. It&#39;s not clear if all we&#39;re doing is printing out the path or cwd and exiting?</div>



<div><br></div><div>- the extra credit to implement -c that&#39;s for ls with the short format right? i.e. not -l because we have to multi-column output for &#39;-l&#39; already. I&#39;m assuming then that -c is only valid without -l</div>



<div><br></div><div>- For the -R recursive flag, my functionality works great but the output is not similar to system ls. It&#39;s not clear if our output has to match the system implementation. In the system implementation, each directory is printed out then there&#39;s a break then the next directory path then it&#39;s contents, etc. Does our implementation have to match? I&#39;m using FTS and the way it traverses the directory structure makes printing it out as the system ls does a bit challenging. Currently mine just prints out the files/directories as it traverses based on sort. Any thoughts?</div>



<div><br></div><div>Thanks,</div><div>Tejas</div><div><br></div></div>
<br></div></div>_______________________________________________<br>
cs631apue mailing list<br>
<a href="mailto:cs631apue@lists.stevens.edu" target="_blank">cs631apue@lists.stevens.edu</a><br>
<a href="https://lists.stevens.edu/mailman/listinfo/cs631apue" target="_blank">https://lists.stevens.edu/mailman/listinfo/cs631apue</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></div><br></div>