> For the complete documentation index, see [llms.txt](https://til.devjugal.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://til.devjugal.com/linux/tar-retain-file-permissions.md).

# Tar Retain File Permissions

To retain file permissions we can use `czf` argument with `tar` command.

## Example

```bash
tar czf {TAR_NAME}.tar.gz {NAME_DIRECTORY_TO_COMPRESS}
```

***Source:*** [***Unix - StackExchange***](https://unix.stackexchange.com/a/46971)
