Questions tagged [ln]

Use this tag for questions related to the `ln` (link) command. The `ln` command is available in *nix OS to create links, allowing more than one filename to refer to the same file. Two types of links can be created using `ln`: symbolic links and hard links. Do not use this tag to refer to the natural base-e logarithm (furthermore base-e log is written "log" in most programming languages): use the [natural-logarithm] for that.

The ln (link) command is used in *nix OS to create links, allowing more than one filename to refer to the same file. Two types of links can be created using ln:

  1. Symbolic links: refer to a symbolic path indicating the abstract location of another file. The two file names need not be on the same file system. System call: symlink().
  2. Hard links: refer to the specific location of a physical file. The two file names must both be on the same file system. System call: link().

Note: For questions related to ln function which is used to calculate logarithms, please use the tag.

162 questions
0
votes
0 answers

Can't symlink to folder in mount

I have a NAS mount to my local linux machine at /mnt/nasfolder. I also have the local folder /home/localfolder. I am trying to symlink from /home/localfolder to /mnt/nasfolder using ln -s but get the error: ln: failed to create symbolic link…
Harry Stuart
  • 1,781
  • 2
  • 24
  • 39
0
votes
1 answer

I unlink-ed my Python path, what should I do now?

I'm not familiar with Linux and I am just trying to change my Python dir from one to another. I read from another post that if you do: unlink pathA ln -s pathA pathB It will change to pathB. So that's what I did: unlink…
Zeta Lee
  • 1
  • 1
0
votes
1 answer

Why I can not give the 'ln -s' command an operand through out the command sub $(ls ../*.txt)?

ln -s $(ls ../*.txt) When I do the command above it replay with an error message saying : "ln: target '../foo.txt' is not a directory". foo.txt is the first file that ls command has found in the parent dir. I am trying to make symbolic links for…
olabie
  • 24
  • 6
0
votes
1 answer

get unique root links from a directory of symlinks

I have a largish directory filled with symlinks (created using ln-s) - about 1million of them. They look like so: --img_dir -- img.jpg --> /path/to/some/img.jpg -- imgc.jpg --> /path/to/some/imgc.jpg -- imgd.jpg --> /path/to/some/imgd.jpg --…
JohnJ
  • 6,736
  • 13
  • 49
  • 82
0
votes
1 answer

ln command breaks when there is a space in filename

#!/bin/bash for i in instances/*; do #echo $i if [[ -d "${i}/.minecraft/" ]]; then echo "${i}/.minecraft/" if [ -h "${i}/.minecraft/saves" ]; then rm -f "${i}/.minecraft/saves" …
0
votes
0 answers

Is there a difference between soft links and symbolic links?

On many websites, even on the Wikipedia article discussing links, I often see something like the following: Soft links (symbolic links)... Why two names? Is there a difference (currently or historically)? Please read the question carefully and…
Toby
  • 9,696
  • 16
  • 68
  • 132
0
votes
0 answers

How do I get my logarithm and ln in Kotlin?

I built a calculator with Kotlin, but I have a problem when I want to logarithm and get ln I get the following error when I run my program and want to get my logarithm invalid Double : this my code activity_main.xml
Arash
  • 51
  • 3
0
votes
1 answer

shell command which returns the target of the static link

Is there a built-in unix/linux command which returns the target of a specific symbolic link? for example if i made a symbolic link: %> ln -s build_07-24-2011 latest is there a command "foo" that does this: %> foo latest build_07-24-2011 i know…
dimka
  • 4,301
  • 11
  • 31
  • 36
0
votes
1 answer

Folder write permission on a symlink (Linux/CentOS)

I am having issues with writing to the target folder of a symlink. The files can be read without any issues, but as soon as I try to upload something to the target folder I get a write permission error. lrwxrwxrwx. 1 user1 user1 47 Mar 17 12:35…
chrismaaz
  • 127
  • 4
  • 12
0
votes
1 answer

Does Cplex support using of ln or exponential function for a decision variable?

I am trying to write constraints using ln and exp function, yet I received an error that Cplex can't extract the expression. forall (t in time) Gw_C["Mxr"] == 20523 + 17954 * ln(maxl(pbefore[t])); Ed_c ["RC"]== 0.0422* exp(0.1046*…
0
votes
1 answer

How to link directory to public_html?

I have ~/public_html and few subdirectories with sites inside. But I have also ~/projects with all my projects (not only websites). I'm trying to link ~/projects/X with ~/public_html/X. ln -s ~/projects/X ~/public_html/X But I have error 403,…
ciembor
  • 7,189
  • 13
  • 59
  • 100
0
votes
1 answer

How to link to contents of git repo while switching between branches

I would like to create links to files within a git repo. When I make changes to separate branches, changes are not reflected in the linked file. Is there any way to make links within a git repo (without having to make links for each branch)?
Jak
  • 181
  • 1
  • 2
  • 6
0
votes
1 answer

symlink over ssh fails

Please help me out, as I'm trying to execute 'rm -Rf' and 'ln -s' on a bunch of servers through 'ssh -i' and somehow symlink fails, although running directly on servers works... $ ssh -i ~/.ssh/id_rsa www@web1 ' rm -Rf /home/www/system && …
eistrati
  • 2,314
  • 6
  • 26
  • 35
0
votes
1 answer

Problem with the number of links in a new directory in ubuntu terminal

I have create a new directory in ubuntu terminal on VirtualBox and with the command ls -ldi i saw that the number of linksis two even if the directory is empty. Can someone explain me why? This is an example: riccardo@riccardo-Virtualbox:~$mkdir…
Riccardo S.
  • 100
  • 7
0
votes
1 answer

Linker errors when linking to Filament precompiled libraries

I am attempting to link to a number of libraries in a very rudimentary manner (without the use of any Makefile or CMakeLists.txt), using the following clang++ command: FILAMENT_LIBS="-lassimp -lbackend -lbluegl -lbluevk -lcamutils -lfilabridge…