File Space

Last update on Thursday, 29-Nov-2007 12:21:21 CST.

Allocation Areas & Quotas

There are three main directories or filesystems of importance that exist on the Regatta. You are allocated a finite amount of diskspace on each.

Directory Quota Backed Up? Description
/home/userid 300MB Yes Upon login, you will be situated in /home/userid, where userid is your logon name. This directory can be referenced with the $HOME environment variable.
/tmp1/userid 512MB/1GB No You are automatically granted an allocation of diskspace in the /tmp1 directory. There is a hard limit of 1GB disk usage but you may only go over 512MB for 7 days.
/scratch/userid None No This filesystem is no longer available as of July 27, 2007.
/var
/tmp
4MB
none
No Various programs may write intermediary files in these directories. Files older than 7 days are deleted automatically for /tmp.

Policies

Of the three filesystems mentioned above only your /home directory is backed up. Files can be restored upon request.

Extensions to your /home space will be strongly resisted beyond the standard allocation. The staff will consider increases to your /tmp1 space only for justifiably legitimate needs.

During batch job execution, if at all possible, avoid file transfers involving the tape archive or a remote host. Needed input files that are unavailable on agave should first be copied locally, say, to /tmp1. These files can then be copied to a job's $TMPDIR using the standard 'cp' command. Large output files resulting from batch job execution should be handled similarly.

The saving of data files on agave that are unrelated to processing on it is NOT allowed. Users should also delete all files that are no longer needed. Please cooperate with the staff in this important task.

Common File Commands

Display disk space allotments: quota

agave% quota -v
Disk quotas for user aggie (uid 2134):
     Filesystem   blocks      quota    limit    grace    files      quota    limit    grace
           /var        2       4096     4096                25       1000     1000   
          /home    96260     512000   512000              3014      15000    20000   
          /tmp1   213060     512000  1024000              1076      15000    30000   

The four leftmost columns indicate the filesystem, blocks used, quota, and upper limit. The system will prevent you from writing files beyond your upper limit. Numerical amounts of disk space are given in kilobytes.

Display files and directories: ls

% ls -l      
total 464
drwx------    2 aggie  user           18 May 26 11:03 dira
drwx------    2 aggie  user           30 May 26 11:03 dirb
drwx------    2 aggie  user           18 May 26 11:20 dirc
drwx------    2 aggie  user           18 May 26 11:26 dird
-rw-------    1 aggie  user        43008 May 26 10:56 filea
-rw-------    1 aggie  user        57344 May 26 10:56 fileb
-rw-------    1 aggie  user       353280 May 26 10:56 filec

Sizes are given in bytes. The -a option lists files preceded by a dot. Consult the ls man page for more information about the ls command..

Recursively display disk usage for directories: du

% du -k
32      ./.ssh
48      ./dira
416     ./dirb
23      ./dirc
45      ./dird
69      .
69      total

This indicates the amount of disk space used for each directory including the current working directory. Consult the du man page for more information about the du command.

Locate files in a directory tree: find

Files can be searched according to a variety of conditions. Options that are most commonly used are -name and -size. The full list is given in the find man page.

% find . -size +5000k
./dira/core
./dirc/filed
./dird/filee
./core

In this example, we are searching for files that are greater than 5 megabytes. Consult the find man page for more information about the find command.

Protection & File Security

File security in unix involves three different catagories of users. Files and directories may be owned by user, group and other. Each of class of user can possess read, write, and execute permissions. Permissions for a particular file are listed with the 'ls -al' command.

% ls -al
drwx------    7 aggie  user        16384 May 26 13:34 .
drwxr-xr-x   29 root   root        16384 May 21 12:22 ..
drwx------    2 aggie  user           29 May 26 12:21 dira
-rw-rw----    1 aggie  user        43008 May 26 10:56 filea
-rw----rw-    1 aggie  user        57344 May 26 10:56 fileb
-rw-------    1 aggie  user       353280 May 26 10:56 filec
-rwx------    1 aggie  user        23552 May 26 13:34 script
-rw-------    1 aggie  user         3072 May 26 14:24 scriptb

The left column indicates what class of user and what kind of permission belongs to a file. The first field indicates whether or not it is a directory. The next three indicate permissions for the user class. Three more indicate permissions for the group class and the last three highlight permissions for all others.

As an illustrated example, we see that 'dira' is a directory that has read, write, and execute permissions available to user 'aggie'. Execute permissions for directories permit traversal for that class of user.

'filea' has read and write permissions for the user 'aggie' and the group 'user'.

'fileb' has read and write permissions for the user 'aggie' and all other users not in the group user. This is undesirable if 'fileb' is intended to be a private file.

Notice that the current directory, as indicated by the single dot, has full permissions for aggie and no other. If this is aggie's home directory then no other user would be allowed to view the directory contents. Under normal circumstances, modifications to the default home directory permissions are not needed.

Alters permissions to files and directories: chmod

The chmod command adds or removes specified permissions for any of the three classes of users.

% ls -l fileb
-rw----rw-    1 aggie  user        57344 May 26 10:56 fileb
% chmod o-rw fileb
% ls -l fileb
-rw-------    1 aggie  user        57344 May 26 10:56 fileb

Here we have revoked read and write permissions for all other users not in the group 'user'.

% ls -l scriptb
-rw-------    1 aggie  user         3072 May 26 14:24 scriptb
% chmod u+x scriptb
% ls -l scriptb
-rwx------    1 aggie  user         3072 May 26 14:24 scriptb

'aggie' has now applied user execute permissions to the file 'scriptb'. Consult the chmod man page for more information about the chmod command.

Additional Information

All of the commands outlined above are described in detail in on-line manual pages. To call up the manual page for the 'find' command simply type at the command prompt:

% man find

An introduction to UNIX commands can be found here.