TMP DIRECTORY CLEANUP
ITEM: RTA000028780
Can you tell by the names of the following files in the
system /tmp directory if I can use cron each night and
delete them? With the exception of tape* and temp*
I did not create the other files and I personally do not
need them.
_spam_3426
copyright
croutAVLJBVcAAA
croutAVLJBVcAAC
croutBFLJBVcAAA
croutBFMJBVcAAE
lost+found
lpr
lvm_moves9049
objrepos.inst
rc.net.out
reconfig1
reconfig2
tapelist
tapelist.Z
tempfile9049
---------- ---------- ---------- --------- ---------- ----------
A: From the operating system point of view, all files in /tmp
can be removed (release 3.2 and higher). User run applications
may violate this rule and store data there, but the operating
system does not. A good rule of thumb for removing files
in this directory is to remove by date last accessed or created.
An example of this is in line 77 of /etc/skulker which is provided
to do this cleanup for you.
Skulker is a very good command to use to remove unwanted files from
a system. This is a shell script so you can look at it and find out
the logic behind it. If you need more than what skulker does then you
can modify it to meet your specifications. As for using cron to run
this command, there is already an entry for the skulker command. You
can use this entry or if you are using you own modified version of
the skulker command then you can make your own entry following the one
made for the skulker command. For more information on the skulker
command look in the List of Command in InfoExplorer or at the skulker
script in the /etc directory.
Unfortunately, there is not a plain English write up of what all
skulker does. So I will give you a listing of the files and
directories that skulker affects.
1. Removes all regular files that have not been modified or accessed
in the last 2 days from the '/usr/spool/structmail' directory.
2. Removes all regular files that have not been modified in the last
4 days from the '/usr/spool/qdaemon' directory.
3. Removes all regular files that have not been modified in the last
4 days from the '/usr/lpd/qdir' directory.
4. Removes all files that begins with "tmp" or a number between 0
and 9 (i.e. tmpfile, tmp.3, 3file, 2night) and have not been
modified in the last 2 days from the '/usr/spool/qftp' directory.
5. Removes all regular files that have not been modified or accessed
in the last day from the '/tmp' directory.
6. Removes all regular files that have not been modified or accessed
in the last day from the '/usr/tmp' directory.
7. Removes all regular files that hove not been modified in the last
45 days from the '/usr/news' directory.
8. Removes all '*.bak', '.*.bak', 'a.out', 'core', 'proof',
'galley', '...*', and 'ed.hup' files that have not been accessed
or modified in the last day from the '/', '/usr', '/tmp', and
'/u' filesystems. You may want to move the *.bak and core
deletions to a job you submit yourself. If you encounter
a problem and want our Software Support center to investigate
a bug, they will need the core files created.
9. Removes everything from all '.putdir' directories that have not
been modified in the last day in the '/', '/usr', '/tmp', and
'/u' filesystems.
This is the exact order that the original skulker command will remove
files. You should be able to follow the logic by looking in the script
file and using these as reference points. Everywhere that you see the
'find' command in the skulker script is where one of these steps is
taking place.
---------- ---------- ---------- --------- ---------- ----------
This item was created from library item Q617957 7HFWM
Additional search words:
CLEANUP CUSTORG DIRECTORY IRRISC IX JAN93 RISC TMP 7HFWM
WWQA: ITEM: RTA000028780 ITEM: RTA000028780
Dated: 11/1996 Category: RISCOC
This HTML file was generated 99/06/24~12:43:11
Comments or suggestions?
Contact us