1
These are my folder structure.
[set symbolic links here]
/links/
[entity]
/data/a 1/ #(folder name has blank)
/data/b 1/
/data/c 1/
/data/d 1/
.
.
.
I want to made symbolic link for each entities at once by shellscript.
for file in /data/*; do
echo "${file}"
ln -ds "/data/${file}" "/links/${file}"
done
However it shows the error like this.
/data/a 1
ln: failed to create symbolic link '/data//links/a 1': No such file or directory
I think is is relevant with blanks in folder name....???
How can I solve this??
Just put quotes around filename.
ln -ds "/data/"${file}"" "/link/"${file}""
. – C0deDaedalus – 2018-06-27T05:01:43.637