Originally posted by: degibson
cd /user
cp -R * me
Directory /user/me will automatically be elided by the copy process.
Ummmm.... wouldn't that end up in some sort of loop? With the -R, you're copying all directories recursively, which would include "me", and then you are adding them to "me", which would make more files that have to be added, since you've got to copy everything in "me", which would make "me" get larger and you'd have to copy it.... etc.
Yeah... I just tested it. It warns you, but then creates some goofy stuff. This is some output from the terminal:
[root@cranium test]# cp -R * me
cp: overwrite `me/me/this.txt'? y
cp: overwrite `me/me/me/this.txt'? y
cp: cannot copy a directory, `me', into itself, `me/me'
cp: overwrite `me/this.txt'? y
[root@cranium test]# ls
me this.txt
[root@cranium test]# ls me
me this.txt
[root@cranium test]# ls me/me
me this.txt
[root@cranium test]# ls me/me/me
me this.txt
[root@cranium test]# ls me/me/me/me
this.txt
[root@cranium test]#