Skip to main content

To tar/compress files/directories in batch mode.

Project description

batch-tar

1 Introduction

batch-tar is a tool to tar (and compress) files or directories in batch mode.

2 Installation

pip install batch-tar

There will be a command batch_tar created under the same directory as your pip command.

3 Usage

$ batch_tar

usage: batch_tar [-h] [-l <file>] [-L [<str> [<str> ...]]]
                 [-workdir <directory>] [-tarfile <str>] [-regex <str>]
                 [-compress {z,j}] [-rm] [-p] [--version]

To tar/compress files/directories in batch mode. By Guanliang Meng, see
https://github.com/linzhi2013/batch_tar. version: 0.1

optional arguments:
  -h, --help            show this help message and exit
  -l <file>             path list to be dealed with
  -L [<str> [<str> ...]]
                        basenames of files/subdirecotries in `-workdir`. If
                        `-workdir` was not specified, `-workdir ./` is
                        assumed.
  -workdir <directory>  working directory. must specify `-regex` together
  -tarfile <str>        group all the files/subdirecotries into one file.tar
                        (.bz2 or .gz). only works with `-L` and `-workdir`
  -regex <str>          deal with only the files/subdirecotries in `-l` or
                        `-workdir` whose basenames match the regular
                        expression
  -compress {z,j}       For the subdirecotries, when executing `tar -cf`, also
                        add parameter `z` or `j` for `tar` command. The files
                        will always be gzipped if this option was not set.
  -rm                   delete the files/subdirecotries when tar finishs.
  -p                    only print out the commands, not run. then you can use
                        qsub-sge.pl to submit multiple jobs. Useful to handle
                        a lot of files because I run in single thread mode
                        only! [False]
  --version             show program's version number and exit

Author

Guanliang MENG

Citation

Currently I have no plan for publishing this script.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

batch_tar-0.1.2.tar.gz (17.3 kB view details)

Uploaded Source

File details

Details for the file batch_tar-0.1.2.tar.gz.

File metadata

  • Download URL: batch_tar-0.1.2.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.8

File hashes

Hashes for batch_tar-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ac4b3764eaa6ffe837c4fe83c29c087d31c99ec0db4e4c6752659792b9485e4b
MD5 c11cf7a1f64797c66164fdbb52e67676
BLAKE2b-256 4e6916e75f309c68a99315c54f0224ae6a594f62e5b01657bcf67fb971ce04d0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page