---
name: "archive_write_new"
section: "3"
platform: "linux"
package: "libarchive"
version: "3.8.11-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux", "freebsd", "macos"]
url: "https://carta.tech/man/archive_write_new"
---

# archive\_write\_new(3)

functions for creating archives

## NAME

**archive\_write\_new** – functions for creating archives

## LIBRARY

Streaming Archive Library (libarchive, -larchive)

## SYNOPSIS

**#include \<archive.h\>**

*struct* *archive* *\**\

**archive\_write\_new**(*void*);

## DESCRIPTION

Allocates and initializes a struct archive object suitable for writing a tar archive. NULL is returned on error.

A complete description of the struct archive object can be found in the overview manual page for [libarchive(3)](/man/libarchive/3.md).

## SEE ALSO

[tar(1)](/man/tar/1.md), [archive\_write(3)](/man/archive_write/3.md), [archive\_write\_set\_options(3)](/man/archive_write_set_options/3.md), [libarchive(3)](/man/libarchive/3.md), [cpio(5)](/man/cpio/5.md), [mtree(5)](/man/mtree/5.md), [tar(5)](/man/tar/5.md)
