Timeline for How to copy a directory recursively using hardlinks for each file
Current License: CC BY-SA 3.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 30, 2024 at 12:37 | comment | added | WesternGun | If you want to preserve the dir structure starting from the current dir/start of the copy path, use --parents. Useful when you want to back up some files deep down into the file tree, and want to recover by simply copy paste everything | |
| Jun 20, 2023 at 3:02 | comment | added | Martin Braun | In this mode, files won't be overwritten though. Is there a way? | |
| Jan 20, 2021 at 16:14 | comment | added | endolith | -a = --archive = "same as -dR --preserve=all" = "never follow symbolic links in SOURCE", --preserve=links, and "copy directories recursively", while -l means "hard link files instead of copying" | |
| Jan 20, 2021 at 6:26 | comment | added | Kelly Bang | If dirB exists, dirB will CONTAIN the new dirA. If dirB does not exist, dirB will BE the new dirA. But it probably depends on your OS as to the exact behavior. | |
| Jul 22, 2017 at 19:30 | history | edited | Stéphane Chazelas | CC BY-SA 3.0 | added 126 characters in body |
| Oct 26, 2015 at 23:34 | comment | added | Dave | Be aware that hard links do not work across separate filesystem mounts. | |
| May 11, 2015 at 20:35 | history | edited | Gudmundur Orn | CC BY-SA 3.0 | add a few words on portability |
| May 11, 2015 at 20:05 | comment | added | Stéphane Chazelas | Note that like pax, on FreeBSD, cp -a doesn't hardlink symlinks. | |
| May 9, 2015 at 15:26 | history | answered | Gudmundur Orn | CC BY-SA 3.0 |