Commands to create hierarchical tree structure


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Commands to create hierarchical tree structure
# 1  
Old 02-03-2010
Error 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.Smilie
# 2  
Old 02-03-2010
try this, if it helps ya

Code:
 
$ mkdir -p dir{1,2,3,4}/dir{1,2,3,4}
 
$ ls dir1
dir1  dir2  dir3  dir4
 
$ touch dir{1,2,3,4}/dir{1,2,3,4}/file{1,2,3,4}
 
$ ls dir1/dir1/
file1  file2  file3  file4

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. Shell Programming and Scripting

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... (1 Reply)
Discussion started by: rohit22hamirpur
1 Replies

3. Shell Programming and Scripting

help need while creating tree structure

Hi Experts, I have table in mysql like below: 'user` ( `user_id` int(11) NOT NULL AUTO_INCREMENT, `parent_id` varchar(100) NOT NULL, `member_name` varchar(100) NOT NULL, `city` varchar(100) NOT NULL, `member_id` varchar(100) NOT NULL, `password` varchar(100) NOT... (1 Reply)
Discussion started by: naw_deepak
1 Replies

4. Shell Programming and Scripting

Create an XML tree using perl

Hi, I am having an xml file which looks like this: <Nodes> <Node> <Nodename>Student</Nodename> <Filename>1.txt</filename> <Node> <Nodename>Dummy</Nodename> <Filename>22.txt</filename> </Node> </Node> </Nodes> The text files will have data like this: #1.txt... (8 Replies)
Discussion started by: vanitham
8 Replies

5. UNIX for Dummies Questions & Answers

How to create this tree?

a buddy and i are trying to re-learn basic commands. i havent used linux for awhile. so i need help on this. what are the commands to create a tree like this. . |-- a1.A |-- a1.B |-- opt | |-- documents | | `-- tmp | | |-- backup | | `-- etc | |-- music | `--... (1 Reply)
Discussion started by: ink
1 Replies

6. UNIX for Dummies Questions & Answers

Find a tree structure in software modules

I have a list of software funtions in tcl code. Some of these functions call other functions. I want to build a tree structure of all called functions. Right now I list all the functions into a file then read this file so that I can cat each function and grep for EXECUTE (command that calls... (0 Replies)
Discussion started by: MissI
0 Replies

7. 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

8. Shell Programming and Scripting

tree structure of the data

Hello, I have a file of the following information ( first field parent item, second field child item) PM01 PM02 PM01 PM1A PM02 PM03 PM03 PM04 PM03 PM05 PM03 PM06 PM05 PM10 PM1A PM2A PM2A PM3B PM2A PM3C The output should be like this : PM01 PM02 PM03 PM04 ... (2 Replies)
Discussion started by: ThobiasVakayil
2 Replies

9. Shell Programming and Scripting

Create a binary tree

I need to create a binary tree like structure of directories using shell script... does anyone know of any algorithm for this ? i tried doing a recursive algorithm function CreateDir { level=$1 dirname=$2 mkdir $dirname/sub1/ mkdir $dirname/sub2/ let level=level-1 ... (2 Replies)
Discussion started by: macvijay1985
2 Replies

10. UNIX for Dummies Questions & Answers

What are some benefits of the UNIX hierarchical file structure?

What are some benefits of the UNIX hierarchical file structure? I am new to UNIX and researching some information about it for a class so please help if you can. Thanks. (1 Reply)
Discussion started by: 88923JJJSDK
1 Replies
Login or Register to Ask a Question