Re: ls and globbing and full pathnames
- From: Andrew Sackville-West <andrew@xxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 22 Jan 2007 16:15:54 -0800
On Tue, Jan 23, 2007 at 12:45:33AM +0100, Robert MannI wrote:
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?
find /var/www
then you get the full joy of using find's many features too. just
remember if you are using globbing in find's arguments (such as -name
or -iname) that you should escape the wildcards ala \*
if you really want a comma seperated list, the check out sed or cut.
hth
A
Attachment:
signature.asc
Description: Digital signature
- Follow-Ups:
- Re: ls and globbing and full pathnames
- From: Dan H.
- Re: ls and globbing and full pathnames
- From: x_debian-user_x
- Re: ls and globbing and full pathnames
- References:
- ls and globbing and full pathnames
- From: Robert MannI
- ls and globbing and full pathnames
- Prev by Date: Re: Data Redundancy
- Next by Date: SAMBA deletes folders in my home folder
- Previous by thread: ls and globbing and full pathnames
- Next by thread: Re: ls and globbing and full pathnames
- Index(es):
Relevant Pages
|