85

This question already has an answer here:

Screenshot of terminal with symbolic link

Can you tell me what this is in the area marked red?

If I want to change /media/files/tb-prod/files to some other path, how would I do that?

marked as duplicate by Mikel, jasonwryan, Ramesh, Networker, Jenny D Aug 26 '14 at 3:31

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • yea.. but i didnt know about symbolic link before thats why i added screenshot to someone help. and @michael homer answered me for that. – Mr. J Aug 26 '14 at 3:27
142

files is a symbolic link to /media/files/tb-prod/files. When you access files or anything inside it, you'll really access the path under /media. Symbolic links are made and updated using the ln command. This link could have been made with:

ln -s /media/files/tb-prod/files files

-s means to make a symbolic link. To update a link, either delete the link and create it as above, or use the -f option to ln as well. If you are linking to a folder, also include the -n option:

ln -sfn /a/new/path files

This will replace the link with a new one pointing at /a/new/path.

  • 1
    Example how to delete the symlink would be good – Andrew Atkinson Apr 30 '18 at 12:29
  • 3
    @AndrewAtkinson: you delete a symlink as if it's a normal file, with rm /path/to/symlink. – henrebotha Jun 22 '18 at 10:21

Not the answer you're looking for? Browse other questions tagged or ask your own question.