Managing Devices in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014
 
 

Emptying Temporary Directories

The /var/tmp and /var/spool directories are locations for temporary files which are not necessary to store over long periods of time. You can remove these after determining that the files are no longer needed. Similarly, empty other directories that you know contain temporary files.

To remove unneeded subdirectories, use the rm –r command syntax. The following example shows how to empty a user created temporary directory mywork that also contains temporary subdirectories.

# cd mywork
# ls
filea.000
fileb.000
filec.001
tempdir/
drafts/
# rm -r *
# ls
#