From: Deborah Ariel Pickett <debbiep@mail.csse.monash.edu.au>
To: guckes@math.fu-berlin.de (Sven Guckes)
Cc: zsh-users@sunsite.auc.dk (ZShell Users)
Subject: Re: list of files with full path
Date: Fri, 18 Jan 2002 21:54:03 +1100 (EST) [thread overview]
Message-ID: <200201181054.g0IAs4S01786@bruce.csse.monash.edu.au> (raw)
In-Reply-To: <20020118104317.GA23929@ritz.math.fu-berlin.de> from "Sven Guckes" at Jan 18, 2002 11:43:17 AM
> 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
prev parent reply other threads:[~2002-01-18 10:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-18 10:43 Sven Guckes
2002-01-18 10:45 ` Phil Pennock
2002-01-18 10:54 ` Deborah Ariel Pickett [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200201181054.g0IAs4S01786@bruce.csse.monash.edu.au \
--to=debbiep@mail.csse.monash.edu.au \
--cc=guckes@math.fu-berlin.de \
--cc=zsh-users@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).