Questions tagged [symlink]
A special type of file that references an inexistent or existing file or directory. The contents of a symbolic link consist of an arbitrary string that is the path to the file that the symbolic link points to. When the symlink is encountered during pathname resolution, the string stored by the file is used to modify the pathname resolution.
1,189 questions
0 votes
3 answers
120 views
Why can't I use `rm -r` on a symlink pointing to a directory?
I understand that in unix systems symlinks can link to files and directories and are files themselves so if I want to remove a symlink I need to rm symlink without the trailing /. But they otherwise ...
2 votes
2 answers
336 views
Tar cannot create symlinks on extraction
The command run to un-archive is as follows: tar -zxvpf my_files_weekly.tar.gz --exclude=/etc/ssh/ -C / > /dev/null Results in the following errors: tar: ./usr/share/doc/udev: Cannot create ...
1 vote
2 answers
85 views
Non-recursively Symlinks for a Directory
I’m trying to create a single relative symlink pointing public/train/train back to public/train, but my command ends up nesting infinitely. For example: ln -snrf "$ROOT/public/train" "$...
1 vote
3 answers
169 views
In bash, how to resolve what is actually going to be executed?
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 () ...
6 votes
1 answer
764 views
tar not preserving symlinks
How to create an archive containing links and the linked files. I have some shared libraries of which I want to create an archive. This is what I tried mkdir dest #abc.so is a link file which points ...
0 votes
2 answers
130 views
Why are some symlinks unreadable when their target is readable?
On Linux, I'm looking at /proc/1/cwd. This symlink is not readable as a normal user: $ ls /proc/1/cwd ls: cannot access '/proc/1/cwd': Permission denied But /proc/1 is accessible: $ ls /proc/1 <...
0 votes
3 answers
405 views
/bin, /sbin symlinks mysteriously breaking, init file disappearing. How to debug?
Similar to here, but no solution was found for them either. I also tried checking the history, see if something was running 'rm' but no dice. Periodically, my device stops responding. The only ...
4 votes
2 answers
317 views
How to find and list all symlinks in a short form?
I have a large set of directories and files, along with many symlinks that typically point to a directory called "shared" or to a directory or a file underneath the "shared" ...