System Administration Guide

How to Create a Temporary File System

  1. Become superuser.

  2. If necessary, create the directory where you want to mount the TMPFS and set permissions and ownership as necessary.

  3. Create a temporary file system.


    # mount -F tmpfs swap mount-point
    

    -F tmpfs swap

    A TMPFS file system. 

    mount-point

    The directory where the TMPFS file system is mounted. 

  4. To verify that a temporary file system called /visitors has been created and mounted in the /usr/tmp directory, use the mount command.

    $ mount
                            .
                            .
                            .
    /visitors on /usr/tmp on Wed May 28 15:27:16 1997
    $ ls /usr/tmp
    NTa0006h    ps_data      visitors

Example--Creating a Temporary File System

This example creates a new directory, /export/reports, and mounts a temporary file system at that point.

# mkdir /export/reports
# chmod 777 /export/reports
# mount -F tmpfs swap /export/reports

See the tmpfs(7FS) man page for more information.