Getting the Folder Structure in Unix

Hi All,

I have a compute box and I want to tar directory structure under a directory and then Deploy/untar it in a new compute box so that the directory structure will be exactly the same.

I do not want any of the file to be extracted and deployed but instead only the directory structure.

For example:
the compute box:

xsth1256dap $ uname -a
Linux xstm3414dap 2.6.18-194.11.4.el5 #1 SMP Fri Sep 17 04:57:05 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

I have a directory called /home/filter/data and under that i have
/home/filter/data/bil , /home/filter/data/otm , ..etc

I want the directory structure "/home/filter/data" which includes all the sub-directory structure as well.

Could someone please help me sharing your ideas on this.

Really appreciate your help and time.

if is installed tree package on your system maybe try this

$ tree -d /home/filter/data 

Try this:

tarListOfFiles="./tarFiles.txt"
tarOutputFile="./tarOutput.tar"
find /home/filter/data -type d > "${tarListOfFiles}"
# This on SunOS
tar -cvf "${tarOutputFile}" -I "${tarListOfFiles}"
# This on Linux
tar -cvf "${tarOutputFile}" -T "${tarListOfFiles}"

I hope it helps!