Skip to main content

Questions tagged [readlink]

Use this tag for questions related to the readlink command which prints resolved symbolic links or canonical file names.

1 vote
3 answers
172 views

Bash has the built-in command "type", which indicates how each argument would be interpreted if used as a command name, for instance: $ type myfunction myfunction is a function myfunction () ...
ocroquette's user avatar
0 votes
1 answer
182 views

I'm writing a script wrapping a certain Linux command. Now, that command, when I use it directly on the command-line, has some autocomplete behavior. For example, if I type the command name, then ...
einpoklum's user avatar
  • 11.1k
1 vote
1 answer
285 views

On Windows, I often create a full path to a nonexistent file so that I can provide it to file-saving dialogue boxes, thus telling the host application where to save a file. Using Cygwin, this is done ...
user2153235's user avatar
2 votes
2 answers
3k views

If neither utility readlink, nor realpath is available (I think today mostly from GNU coreutils?), what can I use in POSIX shell scripting to resolve a relative path? There is a realpath C function, ...
finefoot's user avatar
  • 3,586
0 votes
0 answers
67 views

When I run this command 'readlink /proc/3192/exe', it returns the output '/usr/libexec/qemu-kvm;62d69987 (deleted)'. There is a hex string ';62d69987' in the output, what is it?
Tianxin's user avatar
0 votes
1 answer
1k views

I am messing around in bash to try and create a custom PS1 but I'm running into an error when I try to print the absolute path of the directory I am in. I have a directory $FIRMWARE which is a symlink....
potapeno's user avatar
  • 103
1 vote
0 answers
1k views

Given that realpath command does not exists on every unix platform, I would like to replace realpath with readlink command in order to make my shell script as cross-platform as possible. The thing is ...
Panagiotis Simakis's user avatar
5 votes
2 answers
904 views

-f, --canonicalize canonicalize by following every symlink in every component of the given name recursively; all but the last component must exist -e, --canonicalize-existing canonicalize by following ...
jlas's user avatar
  • 95
1 vote
2 answers
478 views

I have a directory containing a lot of symbolic links and some huge subdirectories. I want to get a detailed listing, sorted by time, of just the files in the parent directory, but with targets ...
Leo Simon's user avatar
  • 453
2 votes
1 answer
2k views

TL;DR at the bottom. Background: The following occured on my CentOS 6.10 production server. I was using a browser based terminal program to run the program Midnight Commander which is a console-...
iskyfire's user avatar
  • 133
-1 votes
2 answers
3k views

I am creating a bash function that should return true/false if a specified symlink refers to specified target. I based myself on https://unix.stackexchange.com/a/192341/40237 However, I am having ...
Rabarberski's user avatar
1 vote
1 answer
4k views

I have a symlink to a file on my Ubuntu system, and I need to copy the original file to a different directory and have a new name there. I am able to copy it to a different directory using readlink -...
Akash Sundaresh's user avatar
1 vote
3 answers
3k views

I have this: file_path="/actual/file/path" read_link="$(readlink "$file_path")" # just in case it's a symlink readlink will echo an empty string if it's not a symlink? Is there an option to readlink ...
Alexander Mills's user avatar
4 votes
2 answers
290 views

I want to test whether a file is a link to another link. I tried readlink but it doesn't work the way I need it: [email protected],1:~/subdir1 $ ll lrwxrwxrwx 1 pi pi 13 Apr 10 14:34 hellolink ->...
Arjen's user avatar
  • 188
2 votes
2 answers
518 views

System: Linux Mint 19.1 Cinnamon 64-bit, based on Ubuntu 18.04 LTS. I would like to know if it is possible to get the following information: Is this UUID (of a block device) mounted or not? (without ...
Vlastimil Burián's user avatar

15 30 50 per page