Re: OT: Bash Scripting Question
On Saturday 09 April 2005 01:33 am, Darryl Clarke wrote:
> On Apr 9, 2005 1:17 AM, Hal Vaughan <hal@thresholddigital.com> wrote:
> > I could swear I remember doing this in the past, but I can't remember
> > how, and I hope it wasn't through a recursive script.
> >
> > I've gone through the man and info pages on ls, but I can't find anything
> > (unless I missed the obvious, which has been known to happen before) to
> > use to show a way to print out the full path name for EACH file or
> > directory in a recursive listing?
> >
> > Thanks!
>
> FILES=`ls`
> PWD=`pwd`
>
> for FILE in $FILES;
> do
> echo $PWD/$FILE;
> done
>
Thanks, but that does for THIS directory, but I'm trying to get the full path
for every file in a recursive listing, so if there's a file 3 directories
deep, I'll get the full pathname for it, instead of just the file name.
Hal
> hth.
>
> --
> ~ Darryl ~ smartssa@gmail.com
> http://smartssa.com / http://darrylclarke.com
> International Clean Your Windows Day - April 22, 2005
> http://pileofcrap.org/news/2096/
Reply to: