On Wed, 12 Feb 2020 21:42:42 +0100, Knurpht-openSUSE wrote:
Op woensdag 12 februari 2020 21:38:13 CET schreef Istvan Gabor:
Hello:
I tried to summarize in the subject what I'd like to do:
I want to create symlinks for all the files within a folder recursively with the symlinks to be in one directory. For example:
Source dir:
source/dir1/a/file1 source/dir1/a/file2 source/dir1/a/file3 source/dir1/b/file4 source/dir1/b/file5 source/dir1/b/file6 source/file7
The target should be:
target/file1 -> source/dir1/a/file1 target/file2 -> source/dir1/a/file2 target/file3 -> source/dir1/a/file3 target/file4 -> source/dir1/b/file4 target/file5 -> source/dir1/b/file5 target/file6 -> source/dir1/b/file6 target/file7 -> source/file7
How could do it?
Thanks,
Istvan
cd /path/to/target ln -s /path/to/source/dir1/* .
should work
Thanks! Unfortunately this is not what I want. This command mirrors the directory tree, it symlinks the subdirectories, and not the files within them. For example for source/dir1/a/file1 it creates target/dir -> source/dir1 and not target/file1 -> source/dir1/a/file1 But I did not know that ln works like this, so I learned something. Thanks again, Istvan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org