wx clean

This command cleans up obsolete log files and environment files that have been generated by jobs submitted to the scheduler.


wx: Usage Message
  
  WX CLEAN:
      This command cleans up obsolete log files and environment files
      that have been generated by jobs submitted to the scheduler.
      By default the command cleans the current working directory
      (i.e. removes logs and environment files of the jobs executed in the
      current working directory).
  
      If a list of directories is provided, the command will clean up
      the files in those directories instead.
  
  USAGE:
       % wx clean [OPTIONS] [LIST_OF_DIRS]
  
  OPTIONS:
      -nozap      -- Do not 'zap' isolated nodes (see man vsz for more info).
                     In this way, the cleaning of the current directory
                     may proceed faster.
      -zap        -- Do 'zap' of isolated nodes (see man vsz for more info).
      -deep N     -- Clean the jobs from all directories in which the user
                     has executed jobs in the past N days. The directories
                     are found from the journals.
      -dir <dir>  -- Specify additional paths to check.
      -P PERIOD   -- Install a periodic job to run the cleaning automatically.
      -R          -- Clean the directories recursively.
      -v          -- Increase verbosity.
      -h          -- This help.
  
  
  EXAMPLES:
      % wx clean -h
      % wx clean
      % wx clean -dir /tools/logs/VNC_LOGS -dir /scratch/logs/VNC
      % wx clean .  /tools/logs/VNC_LOGS  /scratch/logs/VNC
      % wx clean -zap
      % wx clean -deep 10
      % wx clean -deep 3 -P 3d
  

Examples

% wx clean -h
% wx clean
% wx clean -dir /tools/logs/VNC_LOGS -dir /scratch/logs/VNC
% wx clean .  /tools/logs/VNC_LOGS  /scratch/logs/VNC
% wx clean -zap
% wx clean -deep 10
% wx clean -deep 3 -P 3d

Comments

Use the option -R (recursive) to also clean up the subdirectories.
% wx clean -R
From within scripts, it is recommended to use the option -nozap, which tells wx clean to skip the calling of the zapping utility vsz, which can be expensive in terms of time and load on the server.
% wx clean -nozap
If you do not remember the directories where you have run jobs, you can use the deep cleaning option -deep that automatically looks in the journals to find out all the directories in which jobs have been run. This option accepts an integer parameter that specifies the number of days to go back in the journals. The following example will go back 10 days:
% wx clean -deep 10
To have Accelerator Plus automatically run wx clean every day, schedule a periodic job. For example, the following command schedules a cleanup once a day in the current directory:
% wx clean -P 1d