From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26001 invoked from network); 18 Jan 2002 10:54:31 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 18 Jan 2002 10:54:31 -0000 Received: (qmail 23261 invoked by alias); 18 Jan 2002 10:54:14 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4598 Received: (qmail 23244 invoked from network); 18 Jan 2002 10:54:12 -0000 From: Deborah Ariel Pickett Message-Id: <200201181054.g0IAs4S01786@bruce.csse.monash.edu.au> Subject: Re: list of files with full path To: guckes@math.fu-berlin.de (Sven Guckes) Date: Fri, 18 Jan 2002 21:54:03 +1100 (EST) Cc: zsh-users@sunsite.auc.dk (ZShell Users) In-Reply-To: <20020118104317.GA23929@ritz.math.fu-berlin.de> from "Sven Guckes" at Jan 18, 2002 11:43:17 AM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit > 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