zsh-users
 help / color / mirror / code / Atom feed
* list of files with full path
@ 2002-01-18 10:43 Sven Guckes
  2002-01-18 10:45 ` Phil Pennock
  2002-01-18 10:54 ` Deborah Ariel Pickett
  0 siblings, 2 replies; 3+ messages in thread
From: Sven Guckes @ 2002-01-18 10:43 UTC (permalink / raw)
  To: ZShell Users

I looked at the manual about "modifiers" -
and they all seem to cut off something.
now, what to use to make a listing of files
with a full path?  is there a modifier for that?

$ ls **/*(???)
/dir/file
/dir/subdir1/file1
/dir/subdir1/file2
/dir/subdir2/file1
/dir/subdir2/file2
etc

There *must* be something for
that with the ZShell, right?  ;-)

Sven


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: list of files with full path
  2002-01-18 10:43 list of files with full path Sven Guckes
@ 2002-01-18 10:45 ` Phil Pennock
  2002-01-18 10:54 ` Deborah Ariel Pickett
  1 sibling, 0 replies; 3+ messages in thread
From: Phil Pennock @ 2002-01-18 10:45 UTC (permalink / raw)
  To: Sven Guckes; +Cc: ZShell Users

On 2002-01-18 at 11:43 +0100, Sven Guckes wrote:
> I looked at the manual about "modifiers" -
> and they all seem to cut off something.
> now, what to use to make a listing of files
> with a full path?  is there a modifier for that?

Why a modifier?

> $ ls **/*(???)
> /dir/file
> /dir/subdir1/file1
> /dir/subdir1/file2
> /dir/subdir2/file1
> /dir/subdir2/file2
> etc

% ls -1d $PWD/**/*

-- 
If geiger counter does not click, the coffee, she is just not thick.
 -- Pitr Dubovich, <http://www.userfriendly.org/>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: list of files with full path
  2002-01-18 10:43 list of files with full path Sven Guckes
  2002-01-18 10:45 ` Phil Pennock
@ 2002-01-18 10:54 ` Deborah Ariel Pickett
  1 sibling, 0 replies; 3+ messages in thread
From: Deborah Ariel Pickett @ 2002-01-18 10:54 UTC (permalink / raw)
  To: Sven Guckes; +Cc: ZShell Users

> I looked at the manual about "modifiers" -
> and they all seem to cut off something.
> now, what to use to make a listing of files
> with a full path?  is there a modifier for that?
> 
> $ ls **/*(???)
> /dir/file
> /dir/subdir1/file1
> /dir/subdir1/file2
> /dir/subdir2/file1
> /dir/subdir2/file2
> etc
> 
> There *must* be something for
> that with the ZShell, right?  ;-)

This works for me:

% print -l **/*

or, if you need to use ls, at least the -d option to show directories
rather than their contents:

% ls -d -1 **/*


If you want to prefix the current working directory, try this:

% print -l $PWD/**/*
or
% ls -d -1 $PWD/**/*

zsh doesn't strip paths from filenames unless you use one of the "word
modifiers" like ":t" ("tail"):

% print -l $PWD/**/*(:t)
(this won't be meaningful with ls)


If you want to print only files, and omit the directory names that
contain them (as your example above does, by leaving off /dir and
/dir/subdir{1,2}), the modifier is (.) for normal files only:

% ls -d -1 **/*(.)
or
% print -l **/*
or
% ls -d -1 $PWD/**/*(.)
or
% print -l $PWD/**/*(.)

I think the latter two produce the output you are seeking, based on your
example.


Or have I misunderstood the question?

-- 
Debbie Pickett http://www.csse.monash.edu.au/~debbiep debbiep@csse.monash.edu.au
"Where's the man, where's the child? Wrapped together side by side, who can tell
   you what to do when Mr Time has come for you?" - _Mr Time_, Alan Parsons


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-01-18 10:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-18 10:43 list of files with full path Sven Guckes
2002-01-18 10:45 ` Phil Pennock
2002-01-18 10:54 ` Deborah Ariel Pickett

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).