ls and globbing and full pathnames



Hello Linux Masters!

I have a particular problem I need to solve related to the "ls" command and
globbing.

As an example, to see the all of the files in the root directories of my
websites I do:
$ ls -m /var/www/*

This gives me the output in the form:
---
/var/www/site1:
index.html, some_image.jpg

/var/www/site2:
index.html, some_other_file
---

Which is beautiful, but I need to work with the output, hence 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?


Muchas Gracias (Thanks),
Rob


Relevant Pages

  • Re: [opensuse] bash - handling expansion of parameters on the command line?
    ... bash - handling expansion of parameters on the command ... I am trying to get a filespec from the ... But sometimes in some rare and special cases you don't want the globbing to occure, and so another feature is the ability to suspend the globbing from happening, and since no single way of doing something is always convenient, there is even at least the 3 different methods above to suspend the globbing. ... Or you could make a seperate xterm/gnome-terminal/etc desktop icon that launches bash with -f so globbing is disabled for that window. ...
    (SuSE)
  • Re: [9fans] mishandling empty lists - lets fix it
    ... cat, rm, chmod, etc. which treated empty lists in the expected ... Then there is the shell. ... globbing as much as possible. ... In any shell with command ...
    (comp.os.plan9)
  • Re: What effect does "shopt -s extglob" has on "find" command in bash ?
    ... I have turned on extglob in bash, but it behaves very strange when I ... Find is an external command, so its globbing isn't affected by bash ... it doesn't expand the wildcard pattern into a list of files as ...
    (comp.unix.shell)
  • Re: export EDITOR==emacs ??
    ... forget this sort of syntactical details all the time. ... to the first "command" in $PATH. ... With zsh, a globbing with no ... echo this is not output ...
    (comp.unix.shell)
  • Re: Excercices
    ... > globbing was done, then globbing must be done by the app ... globbing is done by pgms on such memory-limited machines. ... > the command line long before quoting became an issue to him. ...
    (alt.lang.asm)