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
3 answers

log return calculation by many companies r

I have a file like this. head(Historical_Stock_Prices_R) Date1 MSFT AAPL GOOGL 1 25-01-05 21.02985 4.873362 88.56 2 26-01-05 21.02177 4.886890 94.62 3 27-01-05 21.10259 4.913269 94.04 want to calculate log return using this formula…
0
votes
1 answer

Linux bash script symlink with spaces

I am trying to make a script which will find all the folders and files within a given hard drive. then i want to make the symlinks to another folder. However the ln command fails if the folder or file contains space, can someone help me to modify…
DaeMonS
  • 23
  • 3
0
votes
2 answers

cosh and log in MatLab

I'm new to MatLab and for the sake of an exercise for my university I have to find a root using Newton's method for a given function. >> x = linspace(-3,3); >> y = sinh(x-1)*log((3+2)*x+1)-1-1; Error using * Inner matrix dimensions must agree. >>…
0
votes
1 answer

Use grep output as an ln -s directory

I am writing a bash script where i want to use the grep output below "06" in a link i'm creating. echo [super-shows]Super.Show.S06.1080p.BluRay.DD-EX.5.1.x264 | grep -oP '(?<='S')\d{2}(?=\.)' ln -s…
angelsen
  • 35
  • 5
0
votes
0 answers

Need to control access to my files in unix

A front end utility calls a Unix script through putty which copy/edit/tar the files for the user. Each User has specific roles only i.e. copy or edit the files and this is controlled by the same Unix script itself. I face security issues if a User…
Sumit
  • 245
  • 1
  • 3
  • 10
0
votes
0 answers

plotting multivariable log 2 base function in python

I need to plot a multivariable ln function in python. The Plot will show ln (L 1 (x 1 , x 2 )) over the region x 1 , x 2 ∈ [−5, 5]. The model’s degeneracy will show up as lines in the x 1 -x 2 plane where the value of ln L 1 does not change. I…
bhjghjh
  • 889
  • 3
  • 16
  • 42
0
votes
1 answer

Name a soft link something that isnt the folder's name

This line: sudo ln -s ~/Desktop/backup/massive_folder /var/www/ makes: /var/www/massive_folder with the functionality of massive_folder being linked to in the place that I want it linked to. This is good. I just want massive_folder to be name…
Romulus
  • 1,534
  • 2
  • 11
  • 18
0
votes
1 answer

System Calls: Interpreting ktrace output

While learning for an upcoming exam, I encoutered the following problem: Which was the UNIX command that the user tried to execute? What's happening in the lines that are marked with a * ? What was the problem? I've figured out that the user…
Marek
  • 263
  • 1
  • 5
  • 13
0
votes
0 answers

A loop for linking files inside directory

I am trying to make a bash script that creates a directory for a corresponding directory and links some files in it. So I have a list of directories inside of ~/ with files in them called Lev1_AA, Lev1_AB, Lev1_AC and so on In ~/ my script creates…
0
votes
1 answer

Find and soft link without the parent path

So I have a find command as below which finds the libclntsh.so.* files in a directory instantclient. find instantclient -type f -name "*libclntsh\.so\.[0-9]*\.[0-9]*" This results in for e.g., instantclient/libclntsh.so.11.1 How do I now ln within…
nixgadget
  • 6,983
  • 16
  • 70
  • 103
0
votes
1 answer

Cannot run ctags after executing "ln -s /usr/bin/ctags-exuberant"

By mistake I have executed the following command on my redhat office machine and now I cannot run ctags -R * any more. ln -s /usr/bin/ctags-exuberant Hope following info helps, [ypp:~]$ ls /usr/bin/ctags-exuberant [ypp:~]$ ls:…
ypp
  • 141
  • 10
0
votes
2 answers

link files within directory, with simple command similar to cp

Where my question originated: When running cp source/files.all destination/, all the files within source will now also exist in destination Question: What if I didn't want to duplicate the data from source into destination, but simply link them…
ljc
  • 943
  • 2
  • 10
  • 26
0
votes
1 answer

How do I make symbolic link but cd should show physical directory name

I have a folder in my home directory called ~/bestphotosever So I make a symlink as follows: cd ~ ln -s bestphotosever bpe cd bpe pwd #-- here is what pwd shows --> /home/myuser/bpe #What I would like it to show is the physical name -->…
user603749
  • 1,638
  • 2
  • 24
  • 36
0
votes
1 answer

symbolic link can only be created from parent to child under FreeBSD?

https://www.youtube.com/watch?v=-XosJtC0vyA In the current directory(test), I have used echo date > date.sh ; chmod u+x date.sh to create date.sh and make it executable. Then I used ln -s date.sh ../date.sh.sym1 ln -s ./date.sh…
PPJack
  • 95
  • 1
  • 6
0
votes
0 answers

Installing/linking g95 on osx

I found these libraries: http://www.g95.org/downloads.shtml. I downloaded the x86 OSX binaries, unzipped the file, and did ln -s bin/i686-apple-darwin10.3.0-g95 /usr/local/bin/g95, and added chmod +rx permissions to all these files, but I still…
kilojoules
  • 9,768
  • 18
  • 77
  • 149