tarj - creates a compressed tarfile of a specified file


  tarj [options] <file1 ... fileN>


tarj creates a compressed tarfile of a specified file or directory. tarj is a shorthand command for tar; additions are briefly described below. The tar command is used to create the tarfile; the -j option is used to have tar compress the tarfile. Compression is done with the bzip2 compression format.

The compressed tarfile is named according to the original source file. The compressed tarfile is the original file's name with a file extension appended. The default extension is tbz2, but an alternate extension may be specified with the -extension option.

The original file will be deleted if the -delete option is given. If it isn't given, then the original file will be kept in place.

As stated above, tarj is a shorthand command for the tar command. The additional functionality tarj provides includes: it is quicker to type a tarj command than to type the required tar command, slashes (inserted by some shell file-extension commands) are removed from the input name, the input file may optionally be deleted after tarball creation, and some filename checking is provided.


tarj takes the following options:


Wayne Morrison,


Copyright 2013 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

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.


bzip2(1), tar(1)