在批处理模式下tar/compress文件/目录。

batch-tar的Python项目详细描述


批次焦油

1简介

batch-tar是一个在批处理模式下对文件或目录进行tar(和压缩)的工具。

2安装

pip install batch-tar

将在与您的pip命令相同的目录下创建命令batch_tar

3用法

$ 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

作者

孟冠良

引文

目前我没有计划发布这个脚本。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
启动tyrus独立服务器时发生java ClassNotFoundException   标签中的javael评估   JavaTomcat服务器变得缓慢且无响应   java按钮导致Android应用程序“不幸关闭”   java Spring solr动态字段解析   java查看是否刚刚创建了属性文件   仅在我的安卓应用程序中使用java make phonethic键盘   使用孵化的Java10HttpClient重建HTTP流   消息太大时java AppEngine任务队列异常   使用Tomcat和数据存储远程访问器的java内存不足   如何在Java中将特定于平台的路径插入数据库的文件   安卓如何在React Native中没有reactContext的情况下从无头JS任务执行Java代码?   java将字符串转换为整数错误   java FileInputStream如何在不替换html图标的情况下读取html文件   okhttp获取java。网SocketException:当使用多线程的okhttpclient时,socket关闭   再次发送sms时gsm At命令显示忙碌(java)   java如何检查值是否至少等于列表中的一个字段?   java如何从后台bean更新jsf数据表   Java:在列表中查找组合日