creating soft links with the same name as the target file

awk, filenames, hardlink, shell, symlink

Solution

You can do it with `ln`-only options:

ln -s -t /dir1 /dir2/file1

Problem

``` ln -s /dir1/file1 /dir2/file1 ``` I'd like to create a softlink in target dir1 with same filename as source in dir2 How is this done without typing the file1 name over in the target path

Original source