CERN Accelerating science

This website is no longer maintained. Its content may be obsolete. Please visit http://home.cern/ for current CERN information.



next up previous
Next: About Mail Up: Questions and Answers Previous: General

Unix Related

Question

How can I find out the space ocupied by a directory in Unix?

Answer

The usual way to get the size of a directory with Unix is to use the ``du'' command (pretty standard command to summarize disk usage). You can type:

du -s dir-nameto get the size of a directory in blocks
du -s -k dir-nameto get the size of a directory in kilobytes
du -s -k ./*to get a list of entries giving the size
in kilobytes and the directory name of
a list of files and subdirectories

Question

How can I share software and files with my colleagues?

Answer

First, let us remind you that it is not permitted to have ``common'' accounts or to share passwords with colleagues either inside of outside CERN. It is part of the ``computing regulations'' you have signed when requesting your first computer account. Having said that, it is trivial to share data, programs and other files in a service like CERNSP or HPPLUS (and in general, in any other AFS-based system). This is the way you proceed:

1-
create the ``top'' directory which will contain all shared information under the account of the creator, e.g. if the name of the account is ``blaise'':

mkdir ~blaise/project

2-
create an AFS group with all the colleagues which will share that directory; the name of that group is free:

pts creategroup blaise:mysection
pts adduser member1 blaise:mysection
pts adduser member2 blaise:mysection 
etc...

3-
grant the priviledge you want to that ``group''

fs setacl ~blaise/project \
   blaise:mysection read   (for READ-ONLY)
fs setacl ~blaise/project \
   blaise:mysection write  (for R,W,X)

4-
repeat steps 2 and 3 in order to classify your colleagues at different levels of permission rights.



Michel Goossens
CN Division
Tel. 3363
Tue Nov 28 18:14:41 MET 1995