HELP:2 ques: Copying large directory structure and mkfs

HELP:2 ques: Copying large directory structure and mkfs

Post by QM » Sat, 01 Aug 1998 04:00:00



Hi, I've just created a new partition for my /home directory and have
temporary renamed my old /home directory to /oldhome. The thing is that when I
attempted to transfer the users from /oldhome to /home, i.e.
        cp -R /oldhome/* /home/.
When I use "du -k" on both directories the reported sizes are different. What
am I doing wrong, or what should I be doing?

On another note when I use the "mkfs" command what is the blocksize that I
should set. i.e. to format a partition is it just say
        mkfs.ext2 /dev/hdb1

Thanks.

 
 
 

1. copying a directory structure with a particular file in directories below

Hello,
I need some help/advise on how to copy a directory structure with a
particular file in directories below the start directory.

Let's say I have many text files [*.txt] with many data files and other
files [*.data, *.*]
The directory I want to copy across to another area with only the text
files but which also retains the directory structure.

i.e.,

[root_directory]
 |__[data]
       |__[directory_1]
       |__[direcotry_2]
       |    |__[directory_2.1]
       |
       |__[directory_3]
       |
       |__[directory_N]

I want to copy the directory [data] to another area with just the *.txt
files but retain the directory structure.

I tried to do this

cp -r `find /[root_directory]/[data] -name "*.txt"` .

NOTE: The above when I include the square brackets is meant to
represent the full name of the
directory and is not to be confused with anything else.

cp -r `find /root_directory/data/ -name "*.txt"` .

When doing this, all I get is the *.txt files without the directory
structure. If the *.txt files have the same name it will cause
problems. So I can copy the directory structure it would be great.

I hope you can understand the issue/problem statement from my
explanation.
If you have any questions please ask me.

Thanks,
ROuNIN

2. web based database

3. copying directory structure only

4. 2415 F/W SCSI on a 390

5. How do I copy a whole structure of directory ?

6. Adding Linux to WinXP.

7. automatically copy and rename directory structure

8. Question: Computer Training in Philadelphia?

9. Bash shell script to sort files by date and copy to directory structure

10. Copy entire directory structure from one system to another (Solaris v2.5.1)

11. Copying a directory structure from Unix -> NT via FTP

12. Copying only directory structure

13. Crash copying large directories