NAME
sessmaint - data management for the dirstack and oldjobs session management commands
SYNOPSIS
sessmaint [options] <session1> ... <sessionN>
DESCRIPTION
sessmaint is a general management interface for the session management
commands provided by the dirstack and oldjobs scripts. Those
commands store session information in a sessions directory. sessmaint
provides a set of maintenance operations to handle those files.
The sessions directory is in ~/.sessions. It contains a list of
"standard" sessions that the user habitually uses. This list will vary from
user to user. This file is in ~/.sessions/sessions.
The other files in the sessions directory may be looked at in two ways -- jobs
files and directory files, or active sessions and saved sessions.
Jobs files store a list of jobs the user is expecting to have available at the
re-start of a particular named session. (For example, after logging out and
then logging in again.) The jobs files have the j- prefix. This file
can be created by redirecting the output of the jobs command into the
jobs file. Jobs files are used by oldjobs.
Directory files are a list of directories to be added to a directory stack.
This is the directory stack from the named session when it was last exitted,
with the assumption that the pushd and popd commands will be
followed by a fresh stack save. Directory files are used by dirstack.
Saved sessions are the jobs and directories files for a particular named
session with a particular process id. These files have the .save
suffix. They are not used by anything but sessmaint. They may be
used to restore old sessions or for historical reference.
sessmaint provides the following operations:
- * delete all but the active job and terminal files
- * delete all but most recent saved files
- * copies the active files to .save versions
- * copy a named session's files to a new session name
- * delete files for non-standard sessions
- * give information on the sessions directory and sessions file
- * list all session names
- * list files for a particular session
SESSION NAMES
Warning: Be careful with session names. It'd be best to stick with
distinct session names, and avoid being clever. Simple names have been
used very successfully (e.g., "dev", "docs", "24", "middle48").
Session names containing spaces and non-alphanumerics may work, but they
haven't been tested much at all. It is hoped that such names will be tested
and supported at some point, but those definitely fall into the RSN category.
Use those names at your own risk.
OPTIONS
sessmaint takes the following options:
- -clear
This option deletes all but the active job and directory files. All
*.save files will be deleted as well.
- -clone oldsession newsession
This option clones an existing session to a new session. All the existing
session's files will be copied and given the new session's name. The
process-id portion of the filenames will be copied because there's not much
else that can be done. In addition to copying the files, the new session
name will be added to the sessions file.
- -conf conffile
This option selects an alternate sessions file.
- -dir
This option specifies the sessions directory that should be used.
- -info
This option shows the paths used for the sessions directory and for the
sessions file.
- -list session
This option lists the files associated with the named session.
- -prune
This option deletes all the *.save files except for the most recent.
- -save
This option copies the active files into *.save versions.
- -sessions
This option lists the session names. The names are taken from the sessions
file (standard sessions) and the non-standard session from the sessions
directory.
- -testing
This option forces sessmaint to work in testing mode. The
session directory will be the standard test directory, as reported
by session-tests. The sessions file will be located in that
directory. Most users won't need this option.
- -zap
This option deletes job and directory files for non-standard sessions.
- -verbose
This option gives more extensive descriptions about what is being done.
- -Version
Display the version information for sessmaint.
- -help
Display a help message.
AUTHOR
Wayne Morrison, wayne@waynemorrison.com
LICENSE
Copyright 2015 Wayne Morrison
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
SEE ALSO
dirstack(1),
oldjobs(1),
session-tests(1)