Skip to content

pedroalbanese/tar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 

Repository files navigation

tar

ISC License GoDoc GitHub downloads Go Report Card GitHub go.mod Go version GitHub release (latest by date)

Minimalist Tar Implementation written in Go

Tarballs are archive files commonly used in Unix-like operating systems to group multiple files and directories into a single file for easy storage, transport, and distribution.

Usage

Usage for tar: tar [OPTION] [-f file] [files ...]
  -a    append instead of overwrite; see also -c and -u
  -c    create; it will overwrite the original file
  -d    delete files from tarball
  -f string
        tar file ('-' for stdin/stdout)
  -l    list contents of tarball
  -o    extract to stdout; see also -x
  -s    stats
  -u    update tarball; see also -c and -a
  -x    extract; see also -o

Features

  1. Create tarball (-c): Allows creating a new tarball from a list of files or directories passed as arguments. It also supports the use of wildcards to specify a set of files to include in the tarball.

  2. Extract tarball (-x): Allows extracting the contents of a tarball. If no file or directory is specified as an argument, it extracts the entire content of the tarball. Otherwise, it extracts only the files or directories corresponding to the specified arguments.

  3. Extract to stdout (-o): Allows extracting the content of the tarball directly to the standard output (stdout). Again, if no file or directory is specified as an argument, it extracts the entire content of the tarball to stdout.

  4. List tarball content (-l): Allows listing the content of the tarball without extracting the files. It displays the names of all files and directories present in the tarball.

  5. Remove files from tarball (-d): Allows removing specific files from the tarball. The names of the files to be removed are passed as arguments.

  6. Append to tarball (-a): Allows adding new files or directories to an existing tarball.

  7. Update tarball (-u): Allows updating existing files in the tarball with newer versions, if they already exist.

License

This project is licensed under the MIT License.

Copyright (c) 2015 Chris Howey chris@howey.me
Copyright (c) 2021 Pedro Albanese pedroalbanese@hotmail.com