Wednesday, November 14, 2012

Print a folders structure to file

I come to a tast to examine whole source code structure on SVN and propose restructure it to new layout. some projects were grouped in sub folders.

Install "tree" tool:
sudo apt-get install tree

Command to print tree, without temporary and useless folders, dig in 4th level:
tree -L 4 -d -I "target|webapp|doc|docs|site|src|deploy|sh|java|data|scripts|lib|conf|work|bin|web|webscr|META-INF|hibern|www|css|images|templates|test-conf" > structure.txt

Output is like:


├── auth
│   ├── apache-modules
│   │   ├── auth_client
│   │   │   └── test
│   │   ├── googleauth
│   │   │   └── example
│   │   ├── jansson-2.2
│   │   │   └── test
│   │   ├── m4
│   │   └── mod_some_auth
│   ├── auth-client
│   ├── auth-errors
│   ├── auth-server

No comments:

Post a Comment