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
1 answer

ln has unexpected behavior when using a wildcard

I am planning on filing a bug on coreutils for this, as this behavior is unexpected, and there isn't any practical use for it in the real world... Although it did make me chuckle at first, as I never even knew one could create files with wildcard…
kveroneau
  • 173
  • 1
  • 4
0
votes
2 answers

installing ffmpeg on MAMP

I'm attempting to follow this tutorial: http://drupal.org/node/1464236 on installing ffmpeg on MAMP (for use with Drupal, which is incidental) I'm stuck here: You should also execute in your Terminal which php pecl phpize which should point to your…
beth
  • 1,916
  • 4
  • 23
  • 39
0
votes
5 answers

shell script to link specific files up one level

I've got a folder that's got a whole lot of folders inside, which each contain a movie file. Now I want to be able to see all these movies at one time (but I have to preserve the folder structure) so I wanted to symlink them all to the top level…
stib
  • 3,346
  • 2
  • 30
  • 38
0
votes
1 answer

ln with dotfiles?

I have a directory with several "dot files". I would like to symlink all these files. I tried $ ln -s /usr/dotfiles/* /usr/test ln: creating symbolic link `/usr/test/*' to `/usr/dotfiles/*': No such file or directory
Zombo
  • 1
  • 62
  • 391
  • 407
-1
votes
1 answer

Why does the Linux shell command test -ef not work on soft links as its manual describes?

I create a hard link to student.sh and a soft link to student.sh. The hard links have different inodes than soft links. But when comparing the soft with student.sh by using the test -ef command, it does not work as expected. I had checked the…
xgqfrms
  • 10,077
  • 1
  • 69
  • 68
-1
votes
1 answer

How to delete all hardlinks of multiple files on windows 10?

I create a lot of hardlinks every week. When time comes to clean them, I find myself using the "DeleteAllHardlinks.bat" for ln (https://schinagl.priv.at/nt/ln/ln.html) but I have to drag and drop everyfile one after the other. I would love to find a…
keiju
  • 1
  • 1
-1
votes
2 answers

Why does Bash show me the whole path of my symlinked script when I tab complete its name?

I'm trying to do my own command (test.sh script). The script works perfect and I created a soft link (i.e., ln -s /home/test.sh ~/bin/test). And when I call from anywhere inside RHEL, it also works perfectly. But my problem is the next one: When…
sigsag
  • 37
  • 8
-1
votes
2 answers

Remove all links (aliases) in a directory (tree)

I have a directory of directories which may or may not contain files, other directories or links. I want to delete all the links. Anyone know of a bash script that would let me do this quickly?
Kevin Chavez
  • 949
  • 1
  • 11
  • 27
-2
votes
1 answer

How do I correct this error so that the terminal will accept my input?

$ ln -s/usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/ ln: illegal option -- / usage: ln [-Ffhinsv] source_file [link_name] ln [-Ffhinsv] source_file ... linkname_dir link source_file link_name I am currently trying…
-2
votes
1 answer

linux: can't create a link

I faced to next trouble when I try create a link sudo ln /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a /usr/lib64/libpthread_nonshared.a I get: '/usr/lib/x86_64-linux-gnu/libpthread_nonshared.a' not such file or directory. Despite locate return…
-2
votes
1 answer

The softlink create by me can NOT be access by others

I make a folder "target" in my home and I change its mode to 777 (drwxrwxrwx), I create a softlink in /tmp folder,in /tmp folder. ln -s /home/[myusername]/target target I can read,write to the softlink target(lrwxrwxrwx) , but others can NOT…
郭金昀
  • 29
  • 1
  • 5
-2
votes
1 answer

What is the usage or apply scenarios of 'ln' or 'ln -s'?

I know the underlying principle or the theory difference of symbol link and hard link. But I am still confused with the usage or apply scenarios of them. Where 'ln' or 'ln -s' is often used by using Linux?Who can give me some examples?
Sam
  • 409
  • 1
  • 7
  • 16
1 2 3
10
11