|
#1
| ||||
| ||||
| Does `ditto` follow symlinks?
I know this might be a dumb question, and the answer's probably yes, but does ditto follow links and copy their contents as well, or does it just make a symlink to the original item on the destination and not follow? I ask because I have a symlink in my home folder that points to my back-up firewire drive. Now if I back up my home folder to my back-up drive... kaboom?Thanks!
__________________ michaelsanford.com • Identi.ca • iMac Aluminum 24" | MacOS X 10.5 (current) | 3.06 GHz Intel Core Duo | 4 GB RAM, 1 TB HDD • Acer AspireOne 1.60 GHz | Windows XP Home | 1 GB RAM, 100 GB HDD • AMD Athlon64 3500+ | Ubuntu-server x86_64 | 1240 GB RAID |
|
#2
| ||||
| ||||
|
My impression from the manpage is that it doesn't really do either - it copies the symlinks exactly as they are. I apologize if I'm explaining what you already knew, but: symlinks just contain text, which is substituted into the path to be opened. If the symlink text is absolute (i.e. starts with /) then the text replaces the portion of the path resolved so far. If the text is relative (i.e. does not start with /), then the replaces only the last portion of the path resolved so far - the filename of the symlink itself. So, if /etc is a symlink to "private/etc" (as it is in OS X), and you copied /etc to /other/place using ditto, then revolving "/other/place/etc" would replace just the "etc" part of the path with "private/etc", and look in /other/place/private/etc, which may or may not exist. If on the other hand, /etc was a symlink to "/private/etc" then resolving "/other/place/etc" would result in "/private/etc" replacing the entire path resolved so far, so it would end up pointing to the same place.
__________________ What is the robbing of a bank compared to the founding of a bank? -- Bertold Brecht |
|
#3
| ||||
| ||||
|
Yeah scruffy I had a feeling it just copied the link file without following, but I wanted some reassurance. Never be afraid to explain what one may already know... Thanks!
__________________ michaelsanford.com • Identi.ca • iMac Aluminum 24" | MacOS X 10.5 (current) | 3.06 GHz Intel Core Duo | 4 GB RAM, 1 TB HDD • Acer AspireOne 1.60 GHz | Windows XP Home | 1 GB RAM, 100 GB HDD • AMD Athlon64 3500+ | Ubuntu-server x86_64 | 1240 GB RAID |
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| nfs mounted symlinks | renzop | Networking & Compatibility | 1 | May 3rd, 2003 03:03 PM |
| PureFTPd - don't want to display real path for symlinks... | michaelsanford | Design & Media | 0 | March 27th, 2003 12:13 PM |
| Why don't my symlinks work? | michaelsanford | Design & Media | 6 | March 16th, 2003 04:39 PM |
| Mail.app should follow nettiquette-rules for reply-mails | Remco | Opinions, & Open Letters | 3 | May 9th, 2002 04:06 PM |
| follow your customers links | chevy | Opinions, & Open Letters | 3 | November 19th, 2001 12:33 AM |