Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

From the Django-Documentation:

The django-admin.py script should be on your system path if you installed Django via its setup.py utility. If it’s not on your path, you can find it in site-packages/django/bin within your Python installation. Consider symlinking it from some place on your path, such as /usr/local/bin.'

How do I 'symlink' and how do I know when I need to do it? OS Ubuntu 12.10 32 bit OEM2 GB RAM

share|improve this question
    
I think it kind of depends on what distro you are using.. you don't mention that, but I'm assuming it's Ubuntu. –  Seth Mar 18 '13 at 20:59
3  
No, it does not depend on your distro. Symlinks (aka. soft links) can be created with ln -s [target] [link] where "target" is the path you want "link" to point to. Beware the difference between soft (sym) and hard links. See man ln. –  goldilocks Mar 18 '13 at 21:01
    
thanks for that . I had assumed that was what it meant but I needed to know for certain. –  lightning Mar 19 '13 at 0:07

2 Answers 2

up vote 2 down vote accepted

A symbolic link is where a file has one main name, but there is one extra entry in the file name table that refers any accesses back to main name. It is slower than a hard link at run time, but its more flexible.

You can create a symbolic link using the ln command with the option -s, like:

ln -s abc.txt xyz.txt

If you do ls -l of a directory that contains a symbolic link, you'll see that it's a symbolic link with an l in the first column, and you can see where the file links to in the file name column.

If you remove a soft (symbolic) link it doesn't affect the original file, but if you remove the original file the link becomes a dangling link which points to a nonexistant file

share|improve this answer

A symbolic link (aka soft-link, aka symlink) is a file that contains just the path to another file.

You create it with ln -s <target> <linkname> eg. ln -s /path/to/your/django/django-admin.py /usr/local/bin/django-admin.py.

From that point onwards the system acts as if the file were really in that folder and you can invoke the script without having to use the full path. You use this technique whenever you need two or more instances of one file in several places.

The link-file is not a copy, so the space is not occupied twice. As goldilocks already pointed out, be sure to use -s or else you get a so called hard-link with quite different properties.

share|improve this answer
    
Thanks Guntbert this helps loads, –  lightning Mar 19 '13 at 0:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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