1
vote
3answers
36 views

Sharing a project tree between environments

To save space and time I copied a large project tree on a network drive as hard links, i.e. cp -a -r --link proj proj_B (background: it's huge, needs to be rebuilt from two incompatible ...
3
votes
3answers
108 views

cp SOMEFILE .. copies to a different directory after cd'ing via a symbolic link

Consider the following setup: ~/Desktop/Public/subdir ~/Desktop/subdir --> ~/Desktop/Public/subdir (symbolic link) Now I do: cd ~/Desktop/subdir Which leads me into the linked directory. If ...
1
vote
1answer
215 views

Symlink Copy a Directory Non-recursively

So I want to symlink copy all the files and folders in one directory to another directory. When I use cp -s though without the -r option I get a bunch of "omitting directory" warnings, and I don't ...
1
vote
1answer
765 views

How to copy symbolic links while preserving the validity of the link?

Say under directory /usr/local/boost_1_52_0/stage/lib, I have a symbolic link: libboost_timer.so, which points to the regular file libboost_timer.so.1.52.0 in the same directory. How can I cp the ...
5
votes
2answers
7k views

How do I copy a symbolic link?

I have a symbolic link to a file in one directory. I would like to have that same link in another directory. How do I copy a symbolic link? I tried to cp the symbolic link but this copies the file ...
5
votes
1answer
402 views

Symbolic links with ls, mv: forcing the functions to utilize “logical” addresses (remembering the original path)

It seems that for many basic functions operating on symbolic links, the physical path is used by default. However, cd works fine. When moving into a symbolic link, cd remembers where I came from so it ...
2
votes
2answers
3k views

Create symbolic links with wildcards

I have multiple hard drives with the same directory hierarchy, for example: /media/sda/dir1 /media/sda/dir2 ... /media/sdb/dir1 /media/sdb/dir2 Two hard drives with similar names and similar ...
5
votes
1answer
1k views

How to replace a symbolic link with a copy of a file it links to?

Having a (single, no batch filesystem processing needed) symlink, what a command line to use to replace it with a copy of the file it links to?