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

Symlink and hide dotfiles

How could I rename a bunch of dotfiles and add the leading dot in the same command? I see people writing: ln -s vimrc .vimrc ln -s gitconfig .gitconfig But I would like something like this: ln -s {vimrc,gitconfig} ~/.$1
user347284
1
vote
3 answers

(mogrify) ln -s creating copies of files

Running the following script: for i in $(find dir -name "*.jpg"); do ln -s $i done incredibly makes symbolic links for 90% of the files and makes of a copy of the remaining 10%. How's that possible? Edit: what's happening after is relevant: Those…
memecs
  • 7,196
  • 7
  • 34
  • 49
1
vote
2 answers

How to create virtual folder with mod_rewrite similar ln -s Unix

Previously was using command ln for create virtual folder. cd public ln -s ../app/assets/ assets ~ public > ls -l lrwxr-xr-x 1 carlosmontalvo admin 14 May 15 12:21 assets -> ../app/assets/ But I want to do with mod_rewrite I tested…
zetanova
  • 481
  • 4
  • 11
1
vote
0 answers

Cygwin: Changes to target files not reflected in hard linked files

I'm using WAMP to develop a small PHP application. I'm also using Cygwin + Oh-My-Zsh to manage my git repository that contains the .html and .php files for the application. My source files exist in a directory outside of the www directory, so I…
Bobby Vandiver
  • 306
  • 3
  • 11
1
vote
1 answer

Randomizing function, etc. locations for shared libs

Currently, when I create a shared library, functions from within the same object files like to lie together. Is there a good solution (that does not involve splitting up source files) to try and spread function locations apart? We are currently…
vol
  • 1,533
  • 3
  • 13
  • 18
1
vote
2 answers

PHP exec permissions for creating root symlinks

I am currently working on a Linux based single board computer for an engineering company, and I am in charge of updating the local configuration website hosted within the board. The point of this configuration server is so that a user can connect to…
jetbomber117
  • 79
  • 1
  • 7
0
votes
2 answers

How Do I Create Links from Filepaths in a File?

Backstory: I have MP3 and FLAC files in my music collection. I have MP3s organized under music/mp3 and FLACs in music/flac. While I prefer listening to FLAC files, most of my music are MP3s. Several of the songs in music/mp3 are the same songs as…
cheapous
  • 3
  • 1
0
votes
2 answers

Unable to make symlinks effectively with target files of the same names

I have a list of dotFiles at my workarea. For example, .bashrc and .vimrc. I want to make a symlinks from them to my Home such that their names are the same as in my workarea -folder. My attempt in pseudo-code ln workarea/.[a-zA-Z] ~/.* The problem…
Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697
0
votes
1 answer

Bash script 'ln' command gives 'No such file or directory' error despite valid paths. Why?

Here is the Problem Description: I am having a very strange issue with a bash script invoking an 'ln' command. I build the command in the script, and then print the command to stdout, and then invoke the command. (Code follows)... If I copy what…
fiddleman
  • 1
  • 2
0
votes
0 answers

Create symbolic link out of find result (find -exexdir and -ln )

I want to use the find command to look for files and create symbolic links for every result, if a condition matches. The script nearly works. Just the ln -s $f $destDir; command doesnt. ln always wants to create the link in the same directory where…
0
votes
0 answers

Symlink creating a nested subdirectory

I don't understand what I'm doing wrong today with trying to create. Inside my current directory, I recreated an empty directory called input. I would like to symlink this to ../../../../opt/build/db/output So within my current directory, I did ln…
David
  • 619
  • 2
  • 8
  • 15
0
votes
1 answer

Transforming all variables to log

I am using Stata, and I would like to generate a log variable based on my current available variables. However, I have too many variables and using generate command will take too much time. Is there a way to do this more efficiently? Say, I am…
Anton
  • 3
  • 3
0
votes
0 answers

soft link on windows folder

I am trying to create soft link of folders on windows. I have cygwin env set in the path so I am able to use ln -s. I am able to create a link but a file is being created rather folder. I can ls to the file ( which should be folder), and it has all…
0
votes
0 answers

Maple simplification of ln expressions

I want to have maple simplify 8ln(6) - 5ln(3) + 10ln(2) - 10ln(5) to ln(7077888/9765625). That is, ln(m/n) where m and n are positive integers. And I want the solution to work for similar expressions with many more terms. I have tried combinations…
Ted Cox
  • 9
  • 2
0
votes
0 answers

Is there any way that automate the localizations translations of my app's .arb file

I have an app_en.arb file which contains my localization translation for the English language. I want to generate other languages's localization files based on this one, and I want to know if there are some software/services that might accelerate…
Gwhyyy
  • 7,554
  • 3
  • 8
  • 35