How to Remove Temporary Files on UNIX or XENIX System

Last reviewed: August 28, 1995
Article ID: Q118914
The information in this article applies to:
  • Microsoft FoxPro for UNIX, version 2.6

SUMMARY

In the past, most UNIX systems would remove all files in /tmp and /usr/tmp by default when the system went multiuser by executing a file called /etc/rc.

Since this removal of temporary files no longer seems to occur, it appears that SCO has removed deleting temporary files from the default behavior of the /etc/rc.d family of scripts. You can remove these files by using the "rm" command.

MORE INFORMATION

Many of the temporary files created by FoxPro for UNIX in /tmp are zero- length files.

To set up your UNIX or XENIX system to automatically clean out temporary files, use a UNIX or XENIX editor (for example, vi) and add the following line to etc/rc.d/4/cleanup:

  rm -f /tmp/*  /usr/tmp/*

This command will remove temporary files from both the /tmp and /usr/tmp directories. The "-f" option tells "rm" not to prompt the user for confirmation when deleting files for which the user does not have write permission. To recursively delete the specified directories, add the "-r" option to the "rm" command.

REFERENCES

SCO UNIX/XENIX Operating System "User's Reference"


Additional reference words: FoxUnix 2.60 temp erase expunge
KBCategory: kbprg
KBSubcategory:


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: August 28, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.