
May 22nd, 2002, 02:04 PM
|
|
Contributing User
|
|
Join Date: May 2002
Location: Kamloops, BC, Canada
Posts: 55
Time spent in forums: < 1 sec
Reputation Power: 12
|
|
One thing to watch for, depending on the Unix system you are using: cp -R directory/ newdirectory and cp -R directory newdirectory can do two different things. On some systems, the / can mean to copy the files in the directory to the new location, or it can mean to copy the entire directory tree.
For instance:
Code:
$ ls test/
file1
file2
file3
$ cp -R test newtest
$ ls newtest/
test
$ ls newtest/test/
file1
file2
file3
Code:
$ ls test/
file1
file2
file3
$ cp -R test/ newtest
$ ls newtest/
file1
file2
file3
The least ambiguous way to make sure it always works the ways you want:
Code:
$ mkdir newtest
$ cp -R test/* newtest/
__________________
Linux is for those who hate Windows.
FreeBSD is for those who love UNIX.
-------
Have you read The Handbook yet?
How about The FAQ?
Have you searched the mailing lists?
Or read any of the man pages?
Have you searched the web for BSD resources?
In short, have you done your homework yet?
|