Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .