How we can create the master file through shell to show the tree structure of the directory?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How we can create the master file through shell to show the tree structure of the directory?
# 1  
Old 08-09-2011
How we can create the master file through shell to show the tree structure of the directory?

Can we create the master file that show the whole tree structure of the directory till a particular folder?

Database that contains four sub repository Sybase,sql,oracle,mysql and sql and oracle contains two subrepostories Siebel and plsql and each repositories contains three folders (trunk,branch,tags)
As per below diagram. I want with the help of command I could get the whole path of the repository e.g.
Database/sql/sibel/tags
Database/oracle/plsql/tags

Database
i) Sybase(trunk,branch,tags)
ii) Sql----------------------sibel(trunk,branch,tags)
iii) Oracle----------------plsql(trunk,branch,tags)
iv) mysql(trunk,branch,tags)
# 2  
Old 08-10-2011
You can postprocess a sorted listing in sed, pulling adjacent lines together in the buffer using N (careful about $), and replacing child lines with entries in the (...,...) list.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script cannot create directory and move the file to that directory

I have a script, which is checking if file exists and move it to another directory if then mkdir -p ${LOCL_FILES_DIR}/cool_${Today}/monthly mv report_manual_alloc_rpt_A_I_ASSIGNMENT.${Today}*.csv ${LOCL_FILES_DIR}/cool_${Today}/monthly ... (9 Replies)
Discussion started by: digioleg54
9 Replies

2. Shell Programming and Scripting

Create a flat file and directory structure

Hi All, is there any work around to generate the file and directory structure like below at left side at Output? and exclude all file except .abc .txt Current Directory structure |-------------files |---------------Share |-----------------dir1 |-----------------dir2... (11 Replies)
Discussion started by: heros
11 Replies

3. Shell Programming and Scripting

Shell output with plot a tree structure.

Hi All, i am in need of plotting graph ( tree structure ) depends upon my shell script output. For this requirement, what kind of open source avail in market. For example: (my script output will be like below ) Parent:A process-name:child-processes A:B,C B: D expecting... (1 Reply)
Discussion started by: ponmuthu
1 Replies

4. Shell Programming and Scripting

Create Directory structure

Hello ; ) again Now I have my file like this : DIR2/DIR3 DIR2 DIR2/DIR3/DIR4/DIR5 I am looking for help to create a loop that will create the directory structure. I need something like this : If "DIR2" does not exist > Create IF "DIR2" exist already > check if onther "DIR"... (5 Replies)
Discussion started by: Aswex
5 Replies

5. UNIX for Dummies Questions & Answers

find mv and create directory structure

Hi there, I'm trying to pull all my flacs out of my Music collection. I can do it with following command find b/ -name *.flac -exec mv {} flac/ \; which works great except it moves all the flac files to the flac folder. I want it to recreate the original folder the flacs were found in and mv... (8 Replies)
Discussion started by: fistikuffs
8 Replies

6. UNIX for Dummies Questions & Answers

Commands to create hierarchical tree structure

I am creating a hierarchical tree structure and I was wondering what commands I needed to do that. I have 4 directories and sixteen sub directories and 4 files. Thank you for your help in getting my started in right direction.:confused: (1 Reply)
Discussion started by: GreginNC
1 Replies

7. UNIX for Dummies Questions & Answers

create tar archive without preserving directory structure?

I am adding some individual files to a tar archive and would like them to be added to the archive without any directory hierarchy, even though the files themselves exist in levels of hierarchy. Unfortunately, tar seems to always preserve the directory hierarchy when it adds the files. Here is... (2 Replies)
Discussion started by: Special_K
2 Replies

8. Shell Programming and Scripting

Shell script for a writing the directory structure to a file

Hi All, I am new user of shell scripting has come up with a problem. that I have a directory structure like : Home | |--------A | |----trunk | |-------A_0_1/ | | | |-------A_0_2/ | |--------B | ... (6 Replies)
Discussion started by: bhaskar_m
6 Replies

9. UNIX for Dummies Questions & Answers

Tree directory structure of Unix to get final node path

Hi, I want to list all the last directories from mentioned base path. for eg: If i have a base path say /base/base1/ How can i get the path till last node in tree like directory structure of unix by applying any command. so that i will get following output. ... (7 Replies)
Discussion started by: Shiv@jad
7 Replies

10. Shell Programming and Scripting

How to create a directory structure with getting input from a file.

Hi How to create a directory structure with getting input from a file. I have file in that following lines are written. ./activemq-4.1.2/activemq-core-4.1.2.jar ./activemq-4.1.2/backport-util-concurrent-2.1.jar ./camel-1.4.0/apache-camel-1.4.0.jar ./camel-1.4.0/lib/activation-1.1.jar... (12 Replies)
Discussion started by: itsjoy2u
12 Replies
Login or Register to Ask a Question