Skip to main content
Bumped by Community user
edited tags
Link
Bumped by Community user

I need to copy a directory tree full of symlinks to files on a different mount, but buried in the directory are 2 or 3 symlinks to directories outside of the copy tree. II need to copy the symlinks pointing to files as actual files but keep the 2 or 3 symlinks to directories as symlinks.

"scp -L"scp -L dereferences everything

I tried "rsync -avHS"rsync -avHS followed by "rsync -avHS --keep-dirlinks"rsync -avHS --keep-dirlinks or "rsync -avHS -K"rsync -avHS -K but those preserve both file and directory links on the destination so you end up with nothing dereferenced.

I need to copy a directory tree full of symlinks to files on a different mount, but buried in the directory are 2 or 3 symlinks to directories outside of the copy tree. I need to copy the symlinks pointing to files as actual files but keep the 2 or 3 symlinks to directories as symlinks.

"scp -L" dereferences everything

I tried "rsync -avHS" followed by "rsync -avHS --keep-dirlinks" or "rsync -avHS -K" but those preserve both file and directory links on the destination so you end up with nothing dereferenced.

I need to copy a directory tree full of symlinks to files on a different mount, but buried in the directory are 2 or 3 symlinks to directories outside the copy tree. I need to copy the symlinks pointing to files as actual files but keep the 2 or 3 symlinks to directories as symlinks.

scp -L dereferences everything

I tried rsync -avHS followed by rsync -avHS --keep-dirlinks or rsync -avHS -K but those preserve both file and directory links on the destination so you end up with nothing dereferenced.

Bumped by Community user
Bumped by Community user
deleted 4 characters in body; edited title
Source Link

Is there a Linux copy program that preserves symlinks to directories and dereferences symlinks to files?

Is there a Linux copy program that preserves symlinks to directories and dereferences symlinks to files?

I need to copy a directory tree full of symlinks to files on a different mount, but buried in the directory are 2 or 3 symlinks to directories outside of the copy tree. I need to copy the symlinks pointing to files as actual files but keep the 2 or 3 symlinks to directories as symlinks.

"scp -L" dereferences everything

I tried "rsync -avHS" followed by "rsync -avHS --keep-dirlinks" or "rsync -avHS -K" but those preserve both file and directory links on the destination so you end up with nothing dereferenced.

Is there a Linux copy program that preserves symlinks to directories and dereferences symlinks to files

I need to copy a directory tree full of symlinks to files on a different mount, but buried in the directory are 2 or 3 symlinks to directories outside of the copy tree. I need to copy the symlinks pointing to files as actual files but keep the 2 or 3 symlinks to directories as symlinks.

"scp -L" dereferences everything

I tried "rsync -avHS" followed by "rsync -avHS --keep-dirlinks" or "rsync -avHS -K" but those preserve both file and directory links on the destination so you end up with nothing dereferenced.

Is there a Linux copy program that preserves symlinks to directories and dereferences symlinks to files?

I need to copy a directory tree full of symlinks to files on a different mount, but buried in the directory are 2 or 3 symlinks to directories outside of the copy tree. I need to copy the symlinks pointing to files as actual files but keep the 2 or 3 symlinks to directories as symlinks.

"scp -L" dereferences everything

I tried "rsync -avHS" followed by "rsync -avHS --keep-dirlinks" or "rsync -avHS -K" but those preserve both file and directory links on the destination so you end up with nothing dereferenced.

Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Source Link
Loading