Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • Doesn't that print the directory name for each file? My understanding is that output should be directory1 file1 file2 ... fileN, one line per directory Commented Jan 3, 2020 at 23:03
  • @roaima This is how I interpreted "Then I nee to print the sub directory name and partial file name." Commented Jan 3, 2020 at 23:13
  • @roaima I added a bit of code for your interpretation of the question as well. Commented Jan 3, 2020 at 23:27
  • Actually with or without -a, that won't work properly to have two columns with dir and file as zsh sorts the list. Adding oN to disable sorting would help, but the list wouldn't be sorted. Commented Jan 4, 2020 at 13:32
  • @StéphaneChazelas I've deleted that bit for now. Commented Jan 4, 2020 at 14:23