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.

Filter by
Sorted by
Tagged with
3
votes
1answer
152 views

Create symbolic link recursively for pictures with unique filename altough timestamp is not enough

The photos of my cameras (.CR2 or .JPG) have correct exif date + time but only in seconds, unfortunately not in milliseconds. Therefore some photos have the same date_time value (shot at the same ...
0
votes
1answer
1k views

Creating symbolic link

I've just picked up a new client's server, he's running CentOS. The server hosts a web app. There are currently two discs on the server, a 120GB SSD disc and a 2TB HDD disc. The original developer ...
0
votes
1answer
75 views

What is wrong with my copy command?

I did the following to my mac with the intention to copy the /etc in /tmp to try something: $cd /tmp $cp -a /etc . $cd etc -bash: cd: etc: No such file or directory $ls -all etc ...
33
votes
4answers
4k views

How to tell if I'm actually in a symlink location from command line?

Suppose I have a folder: cd /home/cpm135/public_html and make a symbolic link ln -s /var/lib/class . Later, I'm in that directory: cd /home/cpm135/public_html/class The pwd is going to tell me I'...
1
vote
0answers
116 views

activemq cannot create kahadb on symlinked data directory

and excuse the English :-) I am installing IBM platform HPC v4.2 for learning purpose in high availability mode. My lab is : physical machine Fedora 25 : nfs3 for shared storage VM1 : manager1 : ...
1
vote
0answers
327 views

Debian install, mounting /var /tmp /home in the same partition

I'm making a new Debian install. I have a SSD and an HDD. My idea was to put /home, /var and /tmp on the same partition in the HDD, and the rest (/) in a tiny partition in the SSD. I followed this ...
0
votes
1answer
497 views

Directory link works inside of path, permission denied in home folder or other locations

On MacOS 10.12.1 I have an issue with symlink permissions I have created a link that is in my $PATH lrwxr-xr-x 1 <redacteduser> staff 48 Dec 14 13:23 <redactedlink> -> /users/&...
0
votes
1answer
193 views

symlinks creates duplicate folder name

I have purchased an ebs volume to keep all my wordpress uploads. My wordpress files are in /var/www/html and in order to link between the upload folder here and in ebs volume, i created a symlink as ...
0
votes
0answers
71 views

Symlinks with a custom root

I have a project at /long/ass/path/to/project that has many soft links within it. Whenever I need to run a new batch in the project I create a link from the output of the last batch to the input of ...
1
vote
1answer
204 views

Symbolic link to folder on another device

If I have a symbolic link in a directory on a physical drive that points to tmpfs RAM partition, and I write to the symbolic link will the physical experience an writing? I'm going to being down a ...
1
vote
1answer
89 views

a command substitute

I'm not going to lie. This is for an assignment. I'm stuck and its kind a frustrating so i came here as my last resort so please help me out. So, I need to make a script to find and print, that if ...
1
vote
2answers
714 views

Remove symbolic link

I have the following situation: [ORACLE]/u01/app/grid/12.1.0.2/network> ll total 20 lrwxrwxrwx. 1 root root 36 May 11 2016 admin -> /u01/app/grid/12.1.0.2/network/admin [ORACLE]/u01/app/grid/...
1
vote
2answers
2k views

Changing file permissions given its symbolic link

Specific USB Hardware is listed here: ls -l /dev/input/by-id/ The symbolic link: /dev/input/by-id/usb-Metrologic_Metrologic_Scanner-event-kbd resolves to: /dev/input/eventxx where xx is an ...
3
votes
0answers
2k views

ld cannot find existing library

I'm trying to build a large application, yet for some reason linking fails and ld responds /usr/bin/ld: cannot find -l/usr/lib/x86_64-linux-gnu/libX11.so Steps I've tried: libx11-dev is correctly ...
2
votes
1answer
212 views

Alternate options for symbolic links (ln)

I want to create an alias of my home folder but I don't have write permissions on parent directory. I used to have a username (user) on an old server. But now, I'm using a new server and my username ...
4
votes
2answers
1k views

Add file outside git repository [closed]

Assume I have local workstation with root access and a server without root access. I want to share (mostly configuration) files between these two computers. So I set up a git repository with top-level ...
2
votes
0answers
961 views

symlink on directory permission denied

I've created a symlink shown here; lrwxrwxrwx 1 apache apache 33 Nov 4 11:55 blog -> /var/www/blog.mysite.com Which resides in the base of this directory /var/www/www.mysite.com/ If I ...
0
votes
1answer
110 views

Purpose of $ in Symbolic Link?

I am following a procedure that indicates creating a symbolic link: sudo ln -s $(DynamsoftBarcodeReader)/lib/libDynamsoftBarcodeReader.so /usr/lib/libDynamsoftBarcodeReader.so I am interpreting this ...
0
votes
2answers
155 views

Simfs hardlinks whereabouts

I got a weird hardlink at centos 6.5 vps server. It's man made, I assume, but I'm not the one who did it. df tells some info. [root@root]# df Filesystem 1K-blocks Used Available Use% ...
1
vote
2answers
1k views

Puppy Linux Live CD: “Symbolic Link to Unsupported Reparse Point”

Here are a few specs: Windows 10 Pro Slacko Puppy 6.3 700 MB CD 16 GB RAM 2 TB HDD Currently, to do some testing, I am running Puppy Linux from a live CD and attempting to access the files on my ...
0
votes
1answer
363 views

How to check if symlink can be created on a path?

Context: A ubuntu Virtualbox VM having shared folders from a Windows host. Provisioner: chef-solo Assuming there is a path /tmp/shared_data and I am attempting to created a symlink on it like ...
-1
votes
2answers
1k views

Copy folder with symlinks

How can I copy a folder that contains symlinks and retain the symlinks in the destination folder? I'm doing something like this with PHP/Bash: system("cp -r production-clone-target production-sites/{...
0
votes
1answer
616 views

symbolic link in linux

I am copying code from a server using rsync over ssh: rsync -avzhe ssh --progress root@ecash-staging:/to/path/file /path/ There is a symbolic link directory which cannot be copied, but I need the ...
1
vote
0answers
67 views

Why root lose permission of 1st and 2nd level symlink? [duplicate]

Why root lose permission to run 1st level symlink /bin/planet and 2nd level symlink /tmp/earth, except symlink target /tmp/sun at the end ? Instead ordinary user no problem to run 3 of them: xiaobai@...
0
votes
1answer
45 views

Attack scenario if files in /bin/ or /sbin/ owned by normal user but not invoked by sudo?

I've learnt the following symlink is insecure because sometime i use vim to edit file by sudo: xiaobai@dnxb:/tmp$ sudo find -L /root \! -user root /root/.vimrc xiaobai@dnxb:/tmp$ ls -lathi /root/....
2
votes
2answers
92 views

How to amend my script to backup my files

I've transferred my files (just text files, jpegs, movies) from my old windows pc to my just-purchased stand-alone Linux laptop (s/h Dell Linux Mint 17.1). To back up these files to usb, the Backup ...
6
votes
2answers
4k views

Why does cp --no-preserve=mode preserves the mode? Alternative tools available?

$ cp --no-preserve=mode --parents /sys/power/state /tmp/test/ $ cp --no-preserve=mode --parents /sys/bus/cpu/drivers_autoprobe /tmp/test/ The second of the two lines will fail with cp: cannot make ...
0
votes
4answers
2k views

Show contents of symbolic link

In zsh, I make a symbolic link $ ln -s ~/Documents symboliclink and then I want to know what's inside this symbolic link. $ ls -l symboliclink > lrwxrwxrwx 1 user user 21 Oct 10 15:56 ...
4
votes
2answers
4k views

How to delete broken symlinks in one go?

I have created symlinks to a large amount of logfiles. The syntax of the logfiles is yyyymmdd.log.gz. To simplify things I use a simple sequence without parsing it with date: for dd in $(seq -w ...
2
votes
2answers
185 views

Symlink fallback

Is there a way for symlinks to have fallback? If the destination is not found, another one should be used. I want to use a config file for a program that is different whether a drive is mounted or ...
3
votes
1answer
120 views

How can I make pwd resolve a soft link?

On one of our servers, we have a directory with the following path: "/daten/i/scripts" When you go to /daten/i, one can see that scripts is a soft link to "/batch". When I type cd /daten/i/scripts ...
1
vote
2answers
674 views

Ignore directories under a certain root while following symlinks with find

I am collecting all the files under a directory. But this directory has symlinks to other directory outside of the directory where I am running the find command and it contains huge number of files as ...
4
votes
2answers
171 views

Am I correct in my understanding of how symlinks and `..` interact under POSIX

I am working on a mathematical description of paths (such as filepaths, but also more abstract and general) One of the most tricky things to define is the behavour of .. (φ in the linked post); ...
0
votes
2answers
916 views

Remove Symlink to home directory

How is a symlink removed from a home directory. I accidentally created a symlink for my home directory, but am worried that deletion will have unintended consequences on my real home directory.
1
vote
2answers
305 views

Is there a light-weight file system that implements symlinks and file permissions on top of another file system that does not support those?

I am using some cloud storage services (like Dropbox, MEGA, Amazon Cloud Drive, etc). Most of these do not support symlinks and file permissions (simple read/write/execute permissions for user, group, ...
1
vote
1answer
163 views

Git tracking dotfiles that are symlinked

I keep my dotfiles in a private git repo on bitbucket and this works great for the majority of my files (.vimrc, .tmux.conf etc) then I just set up symlinks from my home directory to my cloned gitrepo ...
0
votes
1answer
96 views

Where to use and what to use alias or ln -s or PATH (what is the specific difference)

I have idea about alias and ln -s and PATH. Recently, i had some issue once I installed some softwares in my Debian box. While I tried to start the program, it says No such file or directory (in ...
6
votes
2answers
541 views

How to unlink file symlinked to itself without destroying

I'm not sure how this happened, but I have a number of files that have becomed symlinked to themselves. It seems likely that there won't be any way to restore the files, but hopefully there is. Here ...
8
votes
2answers
965 views

Find all absolute links in a directory tree

How do I (recursively) detect all symlinks in a directory that identify their target in an absolute as opposed to in a relative way? Since these links are very likely to break when an entire ...
1
vote
1answer
9k views

soft link vs. hard link

What does that mean that a soft link can cross file system boundaries ? Does that mean that I can create a soft link on a ext3 to a file on a ext4 files system ? Also, while I understand (at least I ...
2
votes
1answer
158 views

What is the difference between -H and -L options of chown?

From the chown manpage: The following options modify how a hierarchy is traversed when the -R option is also specified. If more than one is specified, only the final one takes effect. -H if a ...
0
votes
1answer
47 views

How to create a symlink so that modifications are transfered to the orignal file?

I never created a symlink but I installed bitcoin core and I need to put the blockchain on a different hard drive (let's call it A) than the wallet (on hdd B). So my idea is to create a symlink of the ...
1
vote
0answers
132 views

Symlinks created but not “there” SSH

I am creating Symlinks for Magento purposes but for some reason something is going wrong. I created the symlinks using PuTTy SSH. So I did this: cd /home/user/domains/newwebsite/public_html/ ln -s /...
0
votes
1answer
2k views

What is the difference between “find -H” and “find -L” command?

When I executed the command both commands gave the same output. I created a soft link and a hard link for a file but still both commands gave the same output. Is there a difference between find -H and ...
1
vote
2answers
219 views

Linking file systems with removable media

Is there a way to create a link between something like /usr/bin and /removable/SD Card/usr/bin? I have a chromebook with crouton installed and a 128GB SD Card. I would like to be able to store some ...
-1
votes
3answers
709 views

How to change the way the Linux File System is interpreting my file? My source code file is read as a 'broken link', despite it still a text file

After some operation as run some make files, and emulators, a source code file (*.cc) is read as a 'broken link', despite it still the same file. I know it is the correct file because the (*.cc) file ...
3
votes
1answer
301 views

How do you point to non-default php version without sudo in terminal

Problem: When I ssh to my web server and run anything with "php", it runs an old php 5.2 for some reason. The link /usr/bin/php points to the wrong version. I cannot change this symlink. What I ...
3
votes
1answer
51 views

can you alias to a position inside a file?

Is there a way to create an alias that will open a pdf or other document to a particular position? For example, I have a 105 page pdf which I want to alias/shortcut to in a directory on my system. But ...
2
votes
1answer
830 views

How does restorecon handle links?

I noticed that the rule /usr/sbin/shutdown -- gen_context(system_u:object_r:shutdown_exec_t,s0) labels /usr/sbin/shutdown shutdown_exec_t when /usr/sbin is a directory. But it doesn't restore the ...
2
votes
1answer
545 views

Make `rsync --link-dest` find files recursively

I'm using Rsync as a backup tool. When I create a new backup, I would like it to look in all the existing backup folders for each file and if it already exists, create a hard link. From the Rsync man ...