• Zur Metanavigation
  • Zur Hauptnavigation
  • Zur Suche
  • Zum Inhalt
  • Zur Subnavigation
  • Zum Seitenfuß
  • University of Hamburg
  • For journalists
  • Staff Service Portal0
  • STiNE
https://www.kus.uni-hamburg.de/aktuelles.json?recentnews=true
  • Institutions and target groups
    • Einrichtungen
      • Faculties

        • Faculty of Law
        • Faculty of Business, Economics and Social Sciences
        • Faculty of Medicine
        • Faculty of Education
        • Faculty of Humanities
        • Faculty of Mathematics, Informatics and Natural Sciences
        • Faculty of Psychology and Human Movement Science
        • University of Hamburg Business School
      • Services

        • Study Information Net STiNE
        • Surfmail
        • Exchange
        • Staff Service Portal
        • Learning Platforms
        • Katalogplus – Catalogue of Hamburg Libraries
        • SharePoint
      • Student facilities and services

        • Campus Center
        • Career Center
        • PIASTA
        • AStA (student council)
        • University Sports
        • University Music
        • Family Office
        • University Language Center
        • General Languages
        • Office of Affairs for Students with Disabilities or Chronic Diseases
        • Departmental libraries
        • Healthy Campus
      • Further facilities and services

        • The Cluster of Excellence CLICCS
        • The Cluster of Excellence CUI
        • The Cluster of Excellence Quantum Universe
        • The Cluster of Excellence Understanding Written Artefacts
        • Hamburg Research Academy
        • Pier Plus
        • Hamburg Center for University Teaching and Learning (HUL)
        • Hub for Crossdisciplinary Learning (HCL)
        • CEN
        • Museums and collections
        • University Archives (in German)
        • Regional Computing Center (RRZ)
        • University Administration
        • Knowledge Exchange Agency
        • The Unikontor Shop (in German)
    • Target groups

      • Prospective students
      • Students
      • International prospective students
      • Young researchers
      • Researchers
      • Instructors
      • Staff
      • Prospective continuing education students
      • Alumni
      • Journalists
      • Refugees (in German only)
    Close
  • /en/sitemap.json
University of Hamburg - to research, to teach, to educate and form, to homepage

RRZ

Regional Data Center
(RRZ)
  • Support
    • RRZ-ServiceLine/STiNE-Line
    • RRZ-ServiceDesk
    • RRZ-ServicePortal
    • RRZ Feedback
    • RRZ Portfolio
    • Application Forms
    • Instructions/Glossary
    • FAQ
    • Policies
    • Support Forms
  • Services
  • ID & Authentication
    • Apply for an identifier
    • Forgotten/change password
    • Set up two-factor authentication
    • Managing identifier groups (group manager)
  • Innovation
    • Research & Education
    • Organisational Development
  • About Us
    • RRZ News
    • Mission statement
    • Map / Directions
    • Operating Hours / Opening Hours
    • RRZ Staff
    • Careers
    • Organizational Structure
    • Webinars
    • Equal Opportunity at the RRZ
    • History of the RRZ

Photo: Thomas Orgis

  1. UHH
  2. RRZ
  3. Services
  4. HPC
  5. Hummel-2
  6. working with data
  7. $TMPDIR

Temporary directories ($TMPDIR)

In Linux the standard directory for temporary files is /tmp. For many applications this can be changed by setting the environment variable $TMPDIR. Specifying a suitable TMPDIR is an important optimization for programs that make a lot of scratch I/O.

Contents

  • $TMPDIR in shell sessions and batch jobs
  • Setting $TMPDIR for executing a single command with ssh

See also:

  • Working with data
  • Temporary/scratch files

$TMPDIR in shell sessions and batch jobs

On Hummel-2 directories for temporary files are automatically created and automatically deleted for every interactive session and every batch job. The names of these directories are generated in the Environment Module site/tmpdir and kept in these environment variables:

Variable Explanation
$TMPDIR This variable is always defined.
$RRZ_GLOBAL_TMPDIR Scratch directory in /beegfs.
$RRZ_LOCAL_TMPDIR Exists for Hummel-1 compatibility. Is set to /tmp.

Module site/tmpdir is automatically loaded in interactive session. In batch jobs it is loaded in:

source /sw/batch/init.[c]sh

Module site/tmpdir sets variables in the following way:

Environment Settings
interactive session TMPDIR=/beegfs/tmp/...
RRZ_GLOBAL_TMPDIR=$TMPDIR
RRZ_LOCAL_TMPDIR=$TMPDIR
batch job RRZ_GLOBAL_TMPDIR=/beegfs/scratch/...
RRZ_LOCAL_TMPDIR=/tmp
TMPDIR=$RRZ_LOCAL_TMPDIR
interaktive batch job (salloc)
without
source /sw/batch/init.[c]sh
same as in interactive session
(variables are inherited)
interaktive batch job (salloc)
after
source /sw/batch/init.[c]sh
TMPDIR=/beegfs/tmp/... (taken from session)
RRZ_GLOBAL_TMPDIR=$TMPDIR
RRZ_LOCAL_TMPDIR=/tmp

Setting $TMPDIR for executing a single command with ssh

Commands that are specified on the ssh command line do not run in the usual login environment. As a consequence $TMPDIR is not defined.

If, for example, the default directory for temprary files /tmp is too small, $TMPDIR can be created and defined this way:

  • create a sub-directory in your SSD directory
    $ mkdir /places/$USER/ssd/tmpdir
  • add these lines to your $HOME/.bashrc file
    if [[ -z $TMPDIR ]]
    then
        export TMPDIR=/places/$USER/ssd/tmpdir
    fi

Note that there is no automatic deletion here and that space used in this directory adds to your $SSD disk quota.

  • Hummel-2 (HPC cluster 2024)
    • getting access
    • quick start
    • migration from Hummel
    • hardware
    • working with data
      • temporary directories ($TMPDIR)
        • file transfer to UHHDisk
        • sharing files
      • software
      • running batch jobs
      • RRZ tools
      • acknowledgements
    • Basic skills
    • Courses / events
    • Museum
    • Contact

    Last update: 30 July 2025

    • Feedback
    • Legal notice
    • Privacy statement
    • Accessibility
    • Site map

    University of Hamburg

    Innovating and Cooperating for a Sustainable Future in a Digital Age

    • Follow us on Instagram.
    • Follow us on Facebook.
    • Connect with us on LinkedIn.
    • Follow us on Mastodon.
    • Follow us on Bluesky.
    • Subscribe to our channel on YouTube.
      • Studies
      • Prospective students
      • Continuing education
      • Research
      • Teaching at UHH
      • Doctoral studies
      • Job opportunities
      • Knowledge exchange
      • University
      • Excellence
      • Faculties
      • Alumni
      • Contact
      • Campus Navigator
      • UHHApp
      • Emergencies, safety and security
      • Antidiscrimination
    Go to family-friendly higher education institution audit
    Go to internationalisation re-audit
    Go to the Sustainability Audit page
    Go to Diversity Audit
    Go to System accreditation

    © 2026 University of Hamburg. All rights reserved