.TI F77/DISK_SPACE "Sep. 4, 1985"
Minimizing Use of Disk Space

You can save disk space by removing object ('.o') files, and
executable modules ('a.out' files), and core dumps ('core' files)
when they will no longer be used.

You can use the 'find' command to delete all core dumps in your
account:

	find ~ -name core -exec /bin/rm {} \\;

Find can also be used to remove all '.o' files
not accessed in the last week:

	find ~ -name '*.o' -atime +7 -exec /bin/rm {} \\;

In the following, it looks for modules and then removes them
only if you say 'y' in response to a query:

	find ~ -name '*.out' -atime +7 -exec /bin/rm -i {} \\;

Change ``~'' to ``.'' to look only in the current directory
and its subdirectories.
See "man 1 find" for more information on 'find'.

If you don't use the debugger, then there is no point in ever saving
core dumps in files; to prevent this, add:

	limit coredumpsize 0

in your .login file.  F77 does not produce dumps unless you use
the '-g' flag, so this mainly eliminates dumps from other programs
and utilites.
If you do execute this, then you must execute:

	unlimit coredumpsize

if you want a dump with f77.

You can reduce the size of modules by stripping them:

	strip a.out

This typically saves 20-40% of the file size.  Use the strip command
only on executable modules (a.out files), not on object ('.o') files.
You can not use the debugger after stripping a module.

It is possible with other commands to strip local symbols from '.o' files;
this is worthwhile mainly for libraries.
See "help f77 biglibs" for details.


Put temporary files in the directory /tmp.  E.g.:

	a.out > /tmp/myoutput

Although files in /tmp may disappear at any time, they usually last
through the day.
If you use /tmp, then your temporary files will disappear even if
you forget about them.

The following commands will strip off the sequence field (cols 73-80)
and any trailing blanks from all the .f files in a directory:

.nf
	foreach i ( *.f )
	  colrm 73 < $i   |    sed -e 's/  *$//' > tmp
	  /bin/mv tmp $i
	end
.fi

Note there are two blanks before the asterisk in the sed command.

In rare circumstances, when tabs are used before the statement
body field and the line contains part of a Hollerith, stripping
trailing blanks is unsafe.  See "help f77 source" for an example.
