1

I have a directory on a small disk:

/home/me

Here I have another directory with more space:

/data/work/mywork

I did this:

ln -s /data/work/mywork /home/me 

And while in /home/me this:

wget htmlToSomeLargeFile 

I thought SomeLargeFile would go straight to /data/work/mywork

but ls shows the opposite

ls/ll in /home/me shows "SomeLargeFile" and "mywork -> /data/work/mywork"

2
  • What ls command did you use and what does it show? Commented Feb 14, 2020 at 14:19
  • 3
    Was /home/me an already existing directory? If so, is there now a symlink /home/me/mywork? Commented Feb 14, 2020 at 14:21

1 Answer 1

4

The command ln -s /data/work/mywork /home/me puts a softlink inside the /home/me directory. It does not replace your /home/me directory. Once you create the softlink, you need to cd mywork to wget files into the linked directory.

2
  • Then what's the point? Commented Feb 14, 2020 at 19:53
  • 1
    @AWE The point is the thing you expect, but if you have an existing directory of the same name, this surprising behavior occurs. Commented Feb 14, 2020 at 21:14

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.