LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Show string or path in terminal when opening a file. (https://www.linuxquestions.org/questions/linux-newbie-8/show-string-or-path-in-terminal-when-opening-a-file-4175642461/)

tomiki 11-16-2018 01:34 AM

Show string or path in terminal when opening a file.
 
I am running Linux Mint 17, Quana, Cinnamon.
i just recently solved a problem involving the program Kolourpaint in the Linux Mint Forum. I couldn't get the file to open. I would type in terminal the file name Kolourpaint and get a string to the error, example
Code:

$ kolourpaint
kolourpaint: error while loading shared libraries: /usr/lib/i386-linux-gnu/libattica.so.0.4: invalid ELF header.

The problem was solved by reinstalling Libattica0.4. But now when I type kolourpaint in the terminal, the system opens the file, which is fine, but what I want to know is what command or option I would have to add to the file name to get the system to show in terminal the path or string, to open the file???

pan64 11-16-2018 02:45 AM

so you mean you execute:
kolourpaint <filename>
or something like this, and would like to know the path to <filename> ?
probably readlink -f <filename> would help you.

tomiki 11-16-2018 10:43 PM

Quote:

Originally Posted by pan64 (Post 5926624)
so you mean you execute:
kolourpaint <filename>
or something like this, and would like to know the path to <filename> ?
probably readlink -f <filename> would help you.

readlink -f shows the location of the <filename>
What I am looking for is the path the <filename> goes through to launch.

ondoho 11-17-2018 01:08 AM

Quote:

Originally Posted by tomiki (Post 5926926)
What I am looking for is the path the <filename> goes through to launch.

it "goes" nowhere.
it stays where it is, and kolourpaint loads it into memory, most likely.

berndbausch 11-17-2018 01:35 AM

Quote:

Originally Posted by tomiki (Post 5926926)
readlink -f shows the location of the <filename>
What I am looking for is the path the <filename> goes through to launch.

What is the difference between path and location? Can you give an example what you want to see?

There is no “path” a file “goes through” when it is launched.

EDIT: Perhaps you want this: https://unix.stackexchange.com/quest...loads-when-run.


All times are GMT -5. The time now is 07:42 AM.