Symlink

 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Symlink
# 1  
Old 09-27-2017
Symlink

I know how to create a symlink but I am getting an error message that the file already exists. Also, my symlink doesn't point from target directory to the path correctly,

Here is an example of the path to my folder structure

path: cd /wkspce/wff/DEV/jobs/DEL


the folder structure is:

DEL (TOP directory)
|
archive (subdirectory directory)
|
DEL (subdirectory under archive)

The symlink target directory is the archive directory and path /wkspc/wff/Dev/data/ess/archive/DEL

My symlink needs to point from the archive directory to /wkspc/wff/Dev/data/ess/archive/DEL


DEL (DEL is the TOP directory and archive is a subdirectory and DEL is another subdirectory under archive.

The symlink results need to look like the following:

Code:
archive ->   wkspc/wff/Dev/data/ess/archive/DEL

# 2  
Old 09-27-2017
Hi,

Can you provide the full command and syntax you are using to try to create your symlink, as well as a directory listing for the directory you are trying to create it in ? Also, what is the full text of the error that you get ?

In terms of creating the desired link, the least complicated method would be something like this:

Code:
cd <full path to directory in which your link needs to exist>
ln -s /wkspc/wff/Dev/data/ess/archive/DEL archive

That would have the effect of creating a symbolic link called archive that points to /wkspc/wff/Dev/data/ess/archive/DEL in whatever directory you cd'd into in the first step.
# 3  
Old 09-27-2017
In addition to what drysdalk has already said, please consider the following...

At one point you show the path: /wkspce/wff/DEV/jobs/DEL
But you say the symlink should contain: wkspc/wff/Dev/data/ess/archive/DEL

There is a huge difference between an absolute pathname (starting with /) and a relative pathname starting with any other character. And, on any filesystem that conforms to standards requirements, the directories:
Code:
/wkspc/wff/Dev

and:
Code:
/wkspce/wff/DEV

are two different directories. Case distinctions are important!

Please verify the actual names of the directories involved and show us the command or function calls you're using to create your symlinks. Without this basic information, there is no way we can help you. It also helps (with any requests posted in this forum) to know what operating system and shell you're using.
# 4  
Old 09-27-2017
Please cd to the root of your directory structure and run
Code:
find . -type d -print

Also list the existing symlinks
Code:
find . -type l -exec ls -l {} \;

So we get a clear picture.
Then please say at which directory should the symlink be located and where does it point to.
This User Gave Thanks to MadeInGermany For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to create symlink for latest file only?

Hello, On Solaris 10, here are entries for logs in httpd.conf ErrorLog "|/export/apache/apache-2.2.17/bin/rotatelogs -l -f /var/log/apache/error_log.%Y%m%d 86400" It keeps creating daily logs with below names - -rw-r--r-- 1 root root 1016747232 Apr 5 23:59... (16 Replies)
Discussion started by: solaris_1977
16 Replies

2. Shell Programming and Scripting

Symlink creation

I am trying to setup my plex server to use symlinks rather than host the movie files. in my storage directory, i have both movies(some in subdirectory of the name and some just in the parent directory) and tvshows, which have subdirectories for each season, which contains the episodes i would... (3 Replies)
Discussion started by: bandion
3 Replies

3. UNIX for Dummies Questions & Answers

Remove symlink and target

i would like to remove a directory and also symlink target inside. my_directory -- file1 -> /targetpath/file1 -- file2 -> /targetpath/file2 rm -rf my_directory will not remove symlink target. rm -rf "`readlink -f file1`" will only remove target if specifying the symlink is specified ... (4 Replies)
Discussion started by: lsy
4 Replies

4. Ubuntu

Creating conditional symlink

Hi All, Is there any way to create a symlink that will point to last 1000 line of a log file. My symlink will always point to "tail -1000 logfile". This can be achieved by writing a script and scheduling with high frequency, but I am looking for some other alternatives. Please let me know... (8 Replies)
Discussion started by: sussus2326
8 Replies

5. Red Hat

how to hide the path users on the symlink.

Hello, can someone please suggest or is it possible to hide the path for the link from viewing it from remote users. for examples. as root user login #ls -l lrwxrwxrwx 1 root root 43 Oct 2 16:05 sftpdata -> /data/sftphome/sftpuser1/sftpdata/ #pwd /home/user1 # when user1 logs... (4 Replies)
Discussion started by: bobby320
4 Replies

6. UNIX for Dummies Questions & Answers

Advanced Symlink Creation script

Hello. I am working on creating a script to recursively run on my media collection. The goal is to recreate the folder structure, but with slight changes in the folder names based on my rules. The folders will also include the .jpg & .mkv files, renamed according to a similar set of rules. ... (4 Replies)
Discussion started by: Davinator
4 Replies

7. Shell Programming and Scripting

ln -s creates symlink in symlink, if [ -f ... ] says file that exists doesn't exist

Hi Forums, I got a little problem, I made a few modifications to the code of the launch script of a testing server(minecraft) and now updating is broken aswell as the automatic directory creation. These Lines somehow create an endless symlink that refers to itself and I don't know how to fix... (0 Replies)
Discussion started by: Xaymar
0 Replies

8. Solaris

symlink on link file

Hi all, I want to create a symlink on a link file, i mean, there is a file which is actually a symlink of some version. Now i want to create one more symlink on that link file. EX: there is a file: uat -> version prod -> version Now i want to create one more link on these 'uat' and... (1 Reply)
Discussion started by: raghu.iv85
1 Replies

9. UNIX for Dummies Questions & Answers

creating symlink

hi... I have a folder<abc> under /root folder. I want to create a symlink such that when i click on folder<abc> under root, should display my home folder (home/krish). Immediate inputs appreciated..... (1 Reply)
Discussion started by: rama.honge
1 Replies

10. Linux

Problem in sharing Symlink via NFS

Hi, I have created symlink under /. It is /latest Pointing to /home/users/neel_prog_V1.0. (Note: I have created this symlink so that when version get changed I will need to change only symlink instead of doing changes in /etc/exports.) I have shared this symlink with NFS. in /etc/exports I... (0 Replies)
Discussion started by: neel.gurjar
0 Replies
Login or Register to Ask a Question