tree command

Sharky Forums


Results 1 to 2 of 2

Thread: tree command

  1. #1
    NullPointerException rock's Avatar
    Join Date
    Sep 2000
    Location
    York, PA
    Posts
    6,203

    tree command

    I'm building a script to do some work for me, including creating files to index by a local search engine. I've got something that works about perfectly, but it uses the "tree" command (Red Hat 7.2).

    The build is that our devel area is on Solaris and some developers use Windows too. This script is very far from portable to other platforms. Even the DOS tree doesn't have the required switches (-fi).


    First, does anyone know of a tree command for Solaris?

    Second, is there another command I could use to get the full path to a file. For example, with this command:
    Code:
    tree -fi ../../classes/com/ | grep \\.java > jlist
    I get a nice list of all java source files relative to the current directory. Is there another way to do this?

    Thanks.

    Open Source is free like a puppy is free.

    It's only when you look at an ant through a magnifying glass on a sunny day that you realise how often they burst into flames.

    Understanding Evolution

  2. #2
    NullPointerException rock's Avatar
    Join Date
    Sep 2000
    Location
    York, PA
    Posts
    6,203
    I'd still be interested in any responses, but I broke down and wrote a perl script to do the directory listing. I never thought opendir, readdir and rewinddir would be so useful!

    Open Source is free like a puppy is free.

    It's only when you look at an ant through a magnifying glass on a sunny day that you realise how often they burst into flames.

    Understanding Evolution

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •