I have a ghc
directory containing ghci.conf
:
$ tree ghc
ghc
└── ghci.conf
0 directories, 1 file
And I want to create symbolic link at $HOME/.ghc
, but the latter directory contains other files and directories.
When doing:
$ ln -s -f ghc ~/.ghc
I get a symbolic link to my ghc
under $HOME/.ghc
, which is not what I intended:
$ ls -l ~/.ghc
total 16
lrwxr-xr-x 1 jviotti staff 41 Nov 30 20:40 ghc -> /Users/jviotti/dotfiles/link/ghc
-rw-r--r-- 1 jviotti staff 1883 Nov 30 20:34 ghci_history
drwxr-xr-x 3 jviotti staff 102 Jul 9 13:35 x86_64-darwin-7.6.3
drwxr-xr-x 3 jviotti staff 102 Nov 11 13:51 x86_64-darwin-7.8.3
A quick solution do accomplish this would be to iterate trough the contents of ghc
and execute ln -s
on each file, however I was wondering if there is an easier way to instruct ls
to merge the files automatically of trying to create a symbolic link to a directory from an existing directory.
Does such option exist?