<p>I thought the goal was to ensure that the full path was listed. Using find like that only works if you specify the whole path in $DIR, whereas realpath will always return the full path. I use realpath quite a bit for other things which is why using it came to mind.</p>
<p>--<br>
Sent from my phone... a G2 running CM7 nightlies!</p>
<div class="gmail_quote">On May 27, 2011 1:59 PM, "Geoffrey Myers" <<a href="mailto:lists@serioustechnology.com">lists@serioustechnology.com</a>> wrote:<br type="attribution">> I still don't understand what is wrong with a simple find:<br>
> <br>> find $DIR -print<br>> <br>> Clean, and easy. No different the the OP's windows solution.<br>> <br>> James Sumners wrote:<br>>> Here's a bash script you can use without having to install any extra<br>
>> packages. Note that 1) it is slow and 2) you run it like so:<br>>> `listpath.sh .`<br>>> <br>>> #!/bin/bash<br>>> <br>>> IFS=$'\n'<br>>> <br>>> for f in $(find ${1} -type f); do<br>
>> DIR=$(dirname $(readlink -f ${f}))<br>>> NAME=$(basename ${f})<br>>> <br>>> echo "${DIR}/${NAME}"<br>>> done<br>>> <br>>> On Fri, May 27, 2011 at 12:23 PM, Michael Trausch <<a href="mailto:mike@trausch.us">mike@trausch.us</a>> wrote:<br>
>>> find . -print0 | xargs -0 realpath<br>>>><br>>>> You might have to install the realpath package.<br>>> <br>>> <br>> <br>> <br>> -- <br>> Until later, Geoffrey<br>> <br>
> "I predict future happiness for America if they can prevent<br>> the government from wasting the labors of the people under<br>> the pretense of taking care of them."<br>> - Thomas Jefferson<br>> _______________________________________________<br>
> Ale mailing list<br>> <a href="mailto:Ale@ale.org">Ale@ale.org</a><br>> <a href="http://mail.ale.org/mailman/listinfo/ale">http://mail.ale.org/mailman/listinfo/ale</a><br>> See JOBS, ANNOUNCE and SCHOOLS lists at<br>
> <a href="http://mail.ale.org/mailman/listinfo">http://mail.ale.org/mailman/listinfo</a><br></div>