Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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!)

share|improve this question

1 Answer 1

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
share|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

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.