Questions tagged [symbolic-link]

A symbolic link ("symlink") is a reference to a file or folder which may exist on the same or another drive in the system. Symbolic links allow users to create a more logical file layout, when the files themselves may be spread across multiple disks or relocated to more convenient locations.

Note that these are called "aliases" on Macintosh systems and "shortcuts" on Windows machines.

1049 questions
597
votes
3 answers

"directory junction" vs "directory symbolic link"?

In the context of NTFS: MKLINK [[/D] | [/H] | [/J]] Link Target /D Creates a directory symbolic link. Default is a file symbolic link. /H Creates a hard link instead of a symbolic link. /J Creates a Directory Junction. Link …
Pacerier
  • 28,143
437
votes
13 answers

How can I delete a symbolic link in Windows?

I created a symlink using mklink. Now I need to change it but I can't figure out how to delete it so I can recreate it correctly.
Ben V
  • 4,542
379
votes
11 answers

chown is not changing symbolic link

I'm trying to change the user/group of a symbolic link with the command: $ chown -h myuser:mygroup mysymbolic/ But it's not changing. I'm logged in as root. The current user/group is set to root:root. What went wrong?
rizidoro
242
votes
10 answers

How to copy symbolic links?

I have directory that contains some symbolic links: user@host:include$ find .. -type l -ls 4737414 0 lrwxrwxrwx 1 user group 13 Dec 9 13:47 ../k0607-lsi6/camac -> ../../include 4737415 0 lrwxrwxrwx 1 user group 14 Dec 9 13:49…
Basilevs
  • 2,904
205
votes
6 answers

How can I create a symbolic link on Windows 10?

I was reading http://web.archive.org/web/20160820000804/https://www.dropboxwiki.com/tips-and-tricks/sync-game-saves-across-multiple-computers, and I know junction/mklink worked in Windows 7 as well, but it seems like the junction command has been…
red
  • 2,348
148
votes
2 answers

rsync and symbolic links

I want to backup my home directory to an external drive nightly using a cron job to execute rsync. I am unsure of the exact behavior of rsync's symbolic link flags. rsync's -a flag includes the -l flag (i.e. "copy symlinks as symlinks"). Does…
sean
  • 1,635
139
votes
4 answers

How do file permissions apply to symlinks?

Let's say you have this structure: + directory -- file1 -- file2 -- file3 -> /tmp/file3 file3 is a link to another file3 somewhere else on the system. Now let's say I chmod 777 the directory and all contents inside it. Does my file3 in /tmp receive…
nopcorn
  • 16,982
122
votes
4 answers

How to copy symlinks to target as normal folders

i have a folder with symlinks: marek@marek$ ls -al /usr/share/solr/ razem 36 drwxr-xr-x 5 root root 4096 2010-11-30 08:25 . drwxr-xr-x 358 root root 12288 2010-11-26 12:25 .. drwxr-xr-x 3 root root 4096 2010-11-24 14:29 admin lrwxrwxrwx 1…
Marek
117
votes
6 answers

How do I create a relative symbolic link in Linux?

I need a symlink that resolves relative to the directory it is placed in. What command is used to create such a thing?
112
votes
7 answers

How to remove a symbolic link to a directory?

I am using Ubuntu 8.10, Bash and I made a symbolic link with the following command: ln -s ../test5 I want to remove it now but my rm fails: rm -Rf test5/ rm: cannot remove `test5/`: Not a directory rm test5/ rm: cannot remove directory `test5/`:…
Peter Smit
  • 9,636
106
votes
5 answers

What is the difference between Symbolic Link and Shortcut?

What is the difference between a Symbolic Link and a Shortcut?
deepthi tm
  • 1,061
101
votes
3 answers

Does rm -rf follow symbolic links?

I have a directory like this: $ ls -l total 899166 drwxr-xr-x 12 me scicomp 324 Jan 24 13:47 data -rw-r--r-- 1 me scicomp 84188 Jan 24 13:47 lod-thin-1.000000-0.010000-0.030000.rda drwxr-xr-x 2 me scicomp 808 Jan 24 13:47…
Greg
  • 1,199
95
votes
7 answers

View a list of symbolic links on system?

Is there a way to see a list of all the symbolic links that are active on a Windows machine? I have accepted @JoachimOtahal's answer as it works within a single second and I think provided what I needed when the questionw as asked. Former accepted…
Louis Waweru
  • 25,409
  • 45
  • 137
  • 203
82
votes
4 answers

How to create symbolic links to all files (class of files) in a directory?

I would like to create symbolic links (ln -s) to all files (or a class of files, e.g. ending with .bar) in a certain directory. Say I'm in the cwd and type ls ../source/*.bar gives me foo.bar baz.bar how can I pass the parameter list to ln -s…
dastrobu
  • 923
77
votes
7 answers

How do I create a link in Windows 7 home premium as a regular user?

I am a Linux guy and as such I am very lost when I try and do anything is Windows. I am trying to create the following link: mklink /d C:\backup\data \\myth\backup\data But I do not have sufficient privilege to preform this operation. How do I get…
stephenmm
  • 1,297
1
2 3
69 70