[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
find printing full paths (was: filutils 4.1)
From: |
Bob Proulx |
Subject: |
find printing full paths (was: filutils 4.1) |
Date: |
Thu, 15 Jun 2006 10:43:41 -0600 |
User-agent: |
Mutt/1.5.9i |
James Youngman wrote:
> The Wanderer wrote:
> >For the little it's worth, I also find myself wanting to do something
> >like this from time to time, usually in a context in which find is not a
> >satisfactory alternative - or, at best, in which it would be awkward and
> >potentially difficult to construct a find command which would match all
> >of the desired files and no others.
Could you give an example? The find command has a rich feature set
and I am having a hard time imagining a case such as you describe.
> >(For that matter, I've just scoured the man page to find, and I do
> >not see an option to make it print the absolute path to the file
> >rather than the path relative to the directory from which find was
> >invoked.)
Does this work for you?
find $PWD
> For the record, suppose the list of things you wish to search is in
> the shell variable dirlist. You can then do it like this:
>
> $ dirlist="foo bar baz"
> $ find $( for dir in $dirlist; do ( cd $dir && pwd ) ; done ) -print
> /tmp/foo
> /tmp/foo/29452
> ...
That is cool. But it seems more complicated than needed. Is that
simply to avoid printing the current directory? I feel certain I am
missing a critical item here.
find $PWD/*
Bob
- Re: filutils 4.1, James Youngman, 2006/06/15
- find printing full paths (was: filutils 4.1),
Bob Proulx <=