From BStegmaier

Jump to: navigation, search


Contents

tar

  • Create tar archive
tar cf archive.tar files_or_directories
  • Extract specified file or whole archive if no filename is given
tar xf archive.tar directory/file
  • List content
tar tf archive.tar
  • Options
    • Target directory: -C target/dir
      avoid warnings on removed leading "/" by using -C dirname basename instead of dirname/basename
    • Verbose: v
    • Use gzip: z
    • Create an index with timestamps: -g index-file
      see Incremental Backup


zip

  • Unzip
unzip archive.zip -d dir
  • Create zip archive containing file
zip -r archive.zip file
  • List content
zip -l archive.zip


gz

  • Create
gzip file
  • Extract
gzip -d file.gz
    • List content
gzip -l file.gz


bz2

  • Create
bzip2 file
  • Extract
bzip2 -d file.bz2


shar

  • Create
shar file > archive.shar
  • Extract
sh archive.shar


rar

  • Extract with full path
unrar x archive.rar
  • List content
unrar l archive.rar