[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ls and globbing and full pathnames



> > I need the
> > full filepaths, something like this:
> > ---
> > /var/www/site1/index.html, /var/www/site1/some_image.jpg,
> > /var/www/site2/index.html, /var/www/site2/some_other_file
> > ---
> > Is there any known way to get that kind of output instead?
> 
> find /var/www
> 
> then you get the full joy of using find's many features too. 

And certainly some of those options are needed to print just "all of
the files in the root directories...  "

find /var/www/* -follow -maxdepth 1 -type f

> if you really want a comma seperated list, the check out sed or cut.

Maybe this would suffice (note it prints directories as well):

ls -dm /var/www/*/*



Reply to: