In this question: what did I do on my linux box, used the rm incorrectly

I basically did a rm instead of a mv.

Anyhow, it turns out the /data folder I deleted which was in my home folder is still present somewhere else in my shell i.e. /home/my_user_id/data

So I guess the one I deleted was just a reference/alias to that folder??

How can I re-create this alias so when I do: cd ~ and then ls I see the /data and /domains folder again. (domains is there as I didn't delete that!)

link|improve this question

36% accept rate
feedback

1 Answer

up vote 5 down vote accepted

I don't quite follow your explanation, but you may be after the ln command.

Basically, if you have a folder /stuff/data, and you want that to be available to you as ~/data without moving it, you can do:

ln -s /stuff/data ~/data

This will create a symbolic link ~/data pointing to /stuff/data. If you then do a ls -l you will see something like:

[other columns omitted]  data@ -> /stuff/data
link|improve this answer
bingo! The other folder in my .home was also a symbolic link. Thanks for clearing this up! – user3183 Jul 28 '09 at 0:31
feedback

Your Answer

 
or
required, but never shown

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