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.

My university has a system set up where each class has its own directory for the professors to publish and receive files. These directories reside under a directory in /home which happens to be a mounted disk and are accessible anywhere in the system by referencing ~csXXX where csXXX is a sub-directory within that home directory.

How are they doing this and how can I do it on my own systems?

share|improve this question

2 Answers 2

up vote 5 down vote accepted

There's nothing special about what they're doing, it's just standard shell behavior. (I'm not sure that all shells do this, but at least most of the common ones do, e.g. bash) ~ expands to the home directory of the current user, and ~username expands to the home directory of the named user. So it appears that all they've done is set up one user account for each class.

When I was an undergrad the CS department used the same system. I'm sure it's fairly common.

share|improve this answer
    
That's sensible, and does appear to be the case. I hadn't known about the username expansion before, thanks. –  Chris Sep 10 '10 at 23:23

~ is usually an alias for a user's home directory. In this case, perhaps users of a class share a home directory?

You can see this by typing echo ~ and it should spit out a full path and you can see a user's home directory with finger.

share|improve this answer

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.