any idea to copy directory structure


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers any idea to copy directory structure
# 1  
Old 11-18-2003
ani idea to copy directory structure

I want to copy the durectory structure having subdirectories in it ... would be greatful if anyone could let me know ..

thanks in advance
# 2  
Old 11-18-2003
More details required

Please provide as much detail as possible about the assignment, the deadline that you need it by, and your tutor's email address.

Thanks.
# 3  
Old 11-18-2003
Thanks for being soo nice YGOR

man i just never had the need to do anything like this ...and trust me i don't wanna look into unix man pages to search for one ...

so if u know and are willing to share it then let me know otherwise STOP being sarcastic ....

Give me ur address and i will make u my tutor Smilie .. u sound like a person who knows just a bit too much Smilie...

Take care
# 4  
Old 11-18-2003
If I am in some directory called /dir1 and I want to create that same structure in /dir2, but don't want to copy files:

$ mkdir /dir2
$ cd /dir1
$ find . -type d | cpio -pvdm ../dir2

I'm sure there are other ways.

Cheers,

Keith
# 5  
Old 11-18-2003
more details

i just want to copy the directory structure without copying actaul data in that directory or subdirectory...
# 6  
Old 11-18-2003
If I am in some directory called /dir1 and I want to create that same structure in /dir2, but don't want to copy files:

$ mkdir /dir2
$ cd /dir1
$ find . -type d | cpio -pvdm ../dir2

I'm sure there are other ways.

Cheers,

Keith
# 7  
Old 11-18-2003
Thanks Keith ,

It worked fine for me ...

Thanks again
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Programming

Deep copy of structure in C

Hi , I have a scenario where i need to copy the iter to another local variable , where iter is of type MCC_T_SYS_ADDRINFO *iter . struct addrinfo { int ai_flags; int ai_family; int ai_socktype; int ai_protocol; ... (5 Replies)
Discussion started by: breezevinay
5 Replies

2. Shell Programming and Scripting

Need to copy a directory structure from one server to another

Hello All, I have got a dev server and a production server will call it as D server and P server. I have a dir structure in my D server and i need to create the same dir structure in P server also using a shell script. If i do a find . in my D server, i am getting an o/p like :- . ./vio... (9 Replies)
Discussion started by: Renjesh
9 Replies

3. UNIX for Advanced & Expert Users

Copy Structure excluding some folders

Hi I want to copy the structure from one place to another. -> cd /hol/; -> find . -type d | cpio -pvdm /abc/cat; while copying the structure I want to exclude some directories like test1 and Test. I have read somewhere that this can be done with -prune option. Could anyone... (2 Replies)
Discussion started by: soumodeep123
2 Replies

4. Shell Programming and Scripting

Copy only folder structure ?

Hello, I am not sure how feasible is it, but trying to copy/create the folders from one box to another. I dont want to copy the content of folder otherwise it'd be too much of data.. The folder structure is quite complex (in deep hierarchy) and its a big effort manually .. Please... (5 Replies)
Discussion started by: navsha
5 Replies

5. Shell Programming and Scripting

copy directory structure to a system on the network

I am trying to write a script which has to copy the directory structure from my system to another system on the network. But I dont want the files to be copied. I think I have to start with copying all subdirectories names in a directory to a system on the network. Here's the case: Source... (1 Reply)
Discussion started by: firefox211
1 Replies

6. Shell Programming and Scripting

Recursion to Copy a Directory structure

I have the below code to recurse through a given file path. I am able to go to the leaf level once recursively but traversing out is not possible as the required varaibles don't have the values on return. Both typeset and local don't work for my variable definitions. I have the o/p of the sample... (2 Replies)
Discussion started by: avrkiran
2 Replies

7. UNIX for Dummies Questions & Answers

copy files with directory structure

i have a text file as. /database/sp/NTR_Update_Imsi_List.sql /database/sp/NTR_Update_Imsi_Range_List.sql /database/sp/NTR_Vlr_Upload.sql /database/tables/StatsTables.sql /mib/ntr.mib /mib/ntr.v2.mib /scripts/operations/ntr/IMSITracer.ph /scripts/operations/ntr/IMSITracer.pl ... (3 Replies)
Discussion started by: adddy
3 Replies

8. UNIX for Advanced & Expert Users

MV files from one directory structure(multiple level) to other directory structure

Hi, I am trying to write a script that will move all the files from source directory structure(multiple levels might exist) to destination directory structure. If a sub folder is source doesnot exist in destination then I have to skip and goto next level. I also need to delete the files in... (4 Replies)
Discussion started by: srmadab
4 Replies

9. UNIX for Dummies Questions & Answers

Copying a Directory Structure to a new structure

Hi all Is it possible to copy a structure of a directory only. e.g. I have a file with the following entries that is a result of a find :- /dir1/dir2/file.dbf /dir1/dir2/dir3/file1.dbf /dir1/file.dbf I want to copy these to a directory and keep the structure however starting at a new dir... (8 Replies)
Discussion started by: jhansrod
8 Replies
Login or Register to Ask a Question