LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ln -s question (https://www.linuxquestions.org/questions/linux-newbie-8/ln-s-question-906716/)

Chenchu 10-06-2011 05:30 AM

ln -s question
 
I'm trying to create a link to /var/www/html/install/Packages/ to my /install/ directory.

now when I try
Code:

ln -s /var/www/html/install/Pakcages/ install
it creates the link /install correctly, but when I access to directory it's empty.

is it possible to create a link to a directory??

colucix 10-06-2011 05:44 AM

Yes, it's possible. If you do
Code:

cd install
you should see the content of /var/www/html/install/Pakcages. Are you sure this directory really contains files?

fukawi1 10-06-2011 05:48 AM

out of curiosity, did you miss spell "packages" in the link itself, or just the forum post?
This would effectively create an link to a non existant file, thus the link itself will be empty, if you try and access it by "cd" though, it should give
"No such file or directory" as an error...

But if you were to try and edit it with vi, vi will open an empty file...

mayursingru 10-06-2011 05:52 AM

Hi,
After going through the man page of ln it shows this
Code:

-d, -F, --directory
              allow the superuser to attempt to hard link directories (note: will probably fail due to system restrictions, even for the          superuser)


Chenchu 10-06-2011 05:58 AM

I miss spelled it only on the forum, on the machine I use tab completion

It creates the link, it also seems to be correct, but when I enter the /install directory it just empty.

and... damn I think I erased the original directory. problem solved, my bad.. thanks for the help fellas.

fukawi1 10-06-2011 06:18 AM

That'll do it ;)


All times are GMT -5. The time now is 12:07 PM.