ann kok
2010-Jun-23 16:58 UTC
[CentOS] please help: How to copy all files under the folder
Hi all There are some soft/hard link. symoblic link files/folder under the top folder How to copy all files under this top folder? Thank you
m.roth at 5-cent.us
2010-Jun-23 17:03 UTC
[CentOS] please help: How to copy all files under the folder
ann kok wrote:> > There are some soft/hard link. symoblic link files/folder under the top > folder > > How to copy all files under this top folder?Perhaps you might think about what it is you need help doing, and then come back and tell us what the problem is. What you say, above, is that Linux has soft links, and hard links, and you don't seem to understand the difference, nor what you want to move, from where, to where, and why. And this isn't Windows (tm) - we have directories, not folders.... mark "and that described the file structure better, too"
Les Mikesell
2010-Jun-23 17:19 UTC
[CentOS] please help: How to copy all files under the folder
On 6/23/2010 11:58 AM, ann kok wrote:> Hi all > > There are some soft/hard link. symoblic link files/folder under the top folder > > How to copy all files under this top folder? > > Thank youI usually use rsync even for local copies, but cp -a will work too. I like to cd into the source fold and use '.' as the source name so I don't have to remember the rules about whether a new directory is created under the target or not. I don't think you can make the hard linked files become additional hard links to the same instance without saying to link everything, though. If you use rsync, you have to add -H to hardlink the files together that are hardlinks in the source. This is an inefficient operation and not automatically bundled in the '-a' option like most of the other attribute-preserving options. -- Les Mikesell lesmikesell at gmail.com