Center European Research Science informatics

...because open source matters

  • Increase font size
  • Default font size
  • Decrease font size
Home Create Archives on Cersi Mos

Create Archives on Cersi Mos

E-mail Print PDF

The most common compressed archive file format in Mos is the tar.xz format. Tar file is an archive file format. Xz is a compressed xz file.

How to create a compressed tar.xz file from a folder or file in Mos?

In order to create a compressed tar.xz archive from a folder/file we need to run the following tar command:

tar -cf - folder-to-archive/ | xz -9 -c - > new-tar-file-name.tar.xz

Here is the command explanation:

  • tar - the tar command.
  • c - create new archive.
  • f - use archive file.
  • xz - compress the archive using xz.
  • -9 -0 ... -9           compression preset; default is 6; take compressor *and* decompressor memory usage into account before using 7-9!
  • -c --stdout        write to standard output and don't delete input files
  • new-tar-file-name.tar.xz - the name of the tar.xz to create.
  • folder-to-archive - the name of the folder we want to archive.

How to create a compressed tar.xz file from a folder or file in Mos?

In order to create a compressed tar.xz archive from a folder/file we need to run the following tar command:

tar cJf new-tar-file-name.tar.xz file-or-folder-to-archive

Here is the command explanation:

  • tar - the tar command.
  • c - create new archive.
  • J -  --xz                   filter the archive through xz
    --lzip                 filter the archive through lzip
    --lzma                 filter the archive through lzma
    --lzop
    --no-auto-compress     do not use archive suffix to determine the compression program
  • f - use archive file.
  • new-tar-file-name.tar.xz - the name of the tar.xz to create.
  • file-or-folder-to-archive - the name of the folder we want to archive.

How to create a compressed tar.gz file from a folder or file in Mos?

In order to create a compressed tar.gz archive from a folder/file we need to run the following tar command:

tar czf new-tar-file-name.tar.gz file-or-folder-to-archive

Here is the command explanation:

  • tar - the tar command.
  • c - create new archive.
  • z - compress the archive using gzip.
  • f - use archive file.
  • new-tar-file-name.tar.gz - the name of the tar.gz to create.
  • file-or-folder-to-archive - the name of the folder we want to archive.

How to create a compressed tar.gz file from multiple files and folders in Mos?

In order to create a compressed tar.gz file from multiple files or/and folders we need to run the same tar command we used when we archived a single file/folder and to append the rest of the files/folders' names to it.

tar -czf new-tar-file-name.tar.gz file1 file2 folder1 folder2

How to create a compressed tar.bz2 file from a folder or file in Mos?

In order to create a compressed tar.bz2 archive from a folder/file we need to run the following tar command:

tar cjf new-tar-file-name.tar.bz2 file-or-folder-to-archive

Here is the command explanation:

  • tar - the tar command.
  • c - create new archive.
  • j -  --bzip2 filter the archive through bzip2
  • f - use archive file.
  • new-tar-file-name.tar.bz2 - the name of the tar.bz2 to create.
  • file-or-folder-to-archive - the name of the folder we want to archive.

How to extract a compressed tar.xz file in Mos?

tar -xJf tar-file-name.tar.xz

Here is the command explanation:

  • tar - the tar command.
  • x - extract the archive.
  • J - uncompress the archive using xz.
  • f - use archive file.
  • tar-file-name.tar.xz - the name of the tar.xz to extract.

The tar command will extract all the files/folders in the archive to the current directory.

How to extract a compressed tar.gz file in Mos?

Extracting tar.gz (gzip file) is very similar to the way you extract tar.xz file. Instead of using the -J flag you need to use the -z flag for the gzip format

tar -xzf tar-file-name.tar.gz

Here is the command explanation:

  • tar - the tar command.
  • x - extract the archive.
  • z - uncompress the archive using gzip.
  • f - use archive file.
  • tar-file-name.tar.gz - the name of the tar.gz to extract.

The tar command will extract all the files/folders in the archive to the current directory.

How to extract a compressed tar.bz2 file in Mos?

Extracting tar.bz2 (bzip2 file) is very similar to the way you extract tar.gz file. Instead of using the -z flag you need to use the -j flag for the bzip2 format
tar -xjf tar-file-name.tar.gz

Here is the command explanation:

  • tar - the tar command.
  • x - extract the archive.
  • j - filter the archive through bzip2
  • f - use archive file.
  • tar-file-name.tar.bz2 - the name of the tar.bz2 to extract.

The tar command will extract all the files/folders in the archive to the current directory.

How to create a compressed tar file from split tars?

tar -cvf - ./svnroot/durian | split -a 4 -d -b 256m - /tmp/usb/durian.tar
Last Updated on Thursday, 28 February 2013 20:26  

Newsflash

PACKAGE NAME:     dansguardian-2.12.0.3-x86_64-1mos
COMPRESSED PACKAGE SIZE:     380K
UNCOMPRESSED PACKAGE SIZE:     1.5M

PACKAGE DESCRIPTION:
dansguardian: dansguardian (web content filter)
dansguardian:
dansguardian: DansGuardian is a web content filter. It filters the actual
dansguardian: content of pages based on many methods including phrase matching,
dansguardian: PICS filtering and URL filtering. It does not purely filter
dansguardian: based on a banned list of sites like lesser totally commercial
dansguardian: filters. DansGuardian is designed to be completely flexible and
dansguardian: allows you to tailor the filtering to your exact needs.
dansguardian: