I like to copy all contents of a directory "testdir",i.e. all its
files and subdirectories, into another directory called "temp". 

The problem is that the directory "testdir" itself is also being created
inside the "temp" directory. How can I copy _only_ contents of "testdir" 
without that parent directory, namely "testdir" being recreated inside "temp"?

Following is how it all looks like in my case:

[EMAIL PROTECTED]:~$ ll
drwxr-xr-x  3 user user     1024 2005-11-18 16:05 temp
drwxr-xr-x  3 user user     1024 2005-11-18 16:04 testdir

[EMAIL PROTECTED]:~$ ll testdir/
drwxr-xr-x  2 user user 1024 2005-11-18 16:05 testdir_1
-rw-r--r--  1 user user    0 2005-11-18 16:04 testfile_a
-rw-r--r--  1 user user    0 2005-11-18 16:04 testfile_b
-rw-r--r--  1 user user    0 2005-11-18 16:04 testfile_c
-rw-r--r--  1 user user    0 2005-11-18 16:04 testfile_d

[EMAIL PROTECTED]:~$ cp -drp testdir/ temp/
[EMAIL PROTECTED]:~$ ll temp/
drwxr-xr-x  3 user user 1024 2005-11-18 16:04 testdir

I know I could copy all files with "cp * temp" and then all subdirectories one 
by one butI would prefer a single command to do that. Any chance?

Regards,

-- 
Realos


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to