Sunday, May 5, 2024
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 14905  / 2 Years ago, wed, june 1, 2022, 9:45:05

What is "link to executable" ? I'm trying to understand what "gcc" is. If I open Properties of it in Unity UI it says "link to executable".



I googled it. Tried following commands



link
readlink
ln



I'm confused. What command I should use in order to:




  • check whether file is link or not

  • view where link points to

  • change destination of a link (I need to repoint gcc to gcc 4.7 in my case)


More From » symbolic-link

 Answers
0

Yes, it is a symbolic link, created with the ln command. To replace the link, you need to do



sudo ln -sf /usr/bin/gcc-4.7 /usr/bin/gcc


or



sudo ln -sf `which gcc` `which gcc-4.7`


The -s is for symbolic (otherwise you will get a "hard link"), -f is for "force", because the target already exists.



I assume that you do have gcc-4.7 installed, and that there is a binary in /usr/bin called "gcc-4.7". Ootherwise you will only break your existing link.


[#35344] Thursday, June 2, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
bjecterless

Total Points: 59
Total Questions: 96
Total Answers: 105

Location: Argentina
Member since Thu, Mar 18, 2021
3 Years ago
;