3.12. file_utils.py - utilities to perform various file manipulationsΒΆ
Utilities for dealing with files.
usage: file_utils.py subcommand
- Sub-commands:
- merge_tarballs
Merges separate tarballs into one tarball data can be piped in and/or out
usage: file_utils.py merge_tarballs [-h] [--extractToDiskPath EXTRACT_TO_DISK_PATH] [--pipeInHint PIPE_HINT_IN] [--pipeOutHint PIPE_HINT_OUT] [--threads THREADS] [--loglevel {DEBUG,INFO,WARNING,ERROR,CRITICAL,EXCEPTION}] [--version] [--tmp_dir TMP_DIR] [--tmp_dirKeep] out_tarball in_tarballs [in_tarballs ...]
- Positional arguments:
out_tarball output tarball (*.tar.gz|*.tar.lz4|*.tar.bz2|-); compression is inferred by the file extension. Note: if “-” is used, output will be written to stdout and –pipeOutHint must be provided to indicate compression type when compression type is not gzip (gzip is used by default). in_tarballs input tarballs (*.tar.gz|*.tar.lz4|*.tar.bz2) - Options:
--extractToDiskPath If specified, the tar contents will also be extracted to a local directory. --pipeInHint=gz If specified, the compression type used is used for piped input. --pipeOutHint=gz If specified, the compression type used is used for piped output. --threads Number of threads (default: all available cores) --loglevel=INFO Verboseness of output. [default: %(default)s]
Possible choices: DEBUG, INFO, WARNING, ERROR, CRITICAL, EXCEPTION
--version, -V show program’s version number and exit --tmp_dir=/tmp Base directory for temp files. [default: %(default)s] --tmp_dirKeep=False Keep the tmp_dir if an exception occurs while running. Default is to delete all temp files at the end, even if there’s a failure.