Did you try the command:

tar czf archive.tar.gz *.doc *.xls

Options here are:

  • c: Create
  • z: Gzip
  • f: Output file

To extract:

tar xzf archive.tar.gz

You can read the manual of the tar command for advanced options:

man tar
Answer from Adagyo on Stack Overflow
🌐
Indiana University
servicenow.iu.edu › kb
Use tar to combine multiple files into an archive file - IUKB
In Unix and Unix-like operating systems (such as Linux), you can use the tar command (short for "tape archiving") to combine multiple files into a single archive file for easy storage and/or distribution.
People also ask

How do I extract files from a tarball?
To extract files from a tarball, you can use the tar command as well. For example, to extract the files from the "archive.tar" tarball, you can use the command: tar -xvf archive.tar. This will extract the files and directories to the current directory.
🌐
lenovo.com
lenovo.com › home
Tarball:Create & Use Tarballs | What are the Benefits? | Lenovo US
What is the difference between a tarball and a ZIP file?
A tarball and a ZIP file are both archive formats, but they differ in how they are created and compressed. Tarballs are commonly used in Unix-based systems and preserve file permissions, while ZIP files are more widely supported across different operating systems and provide built-in compression.
🌐
lenovo.com
lenovo.com › home
Tarball:Create & Use Tarballs | What are the Benefits? | Lenovo US
What is the file extension of a tarball?
Tarballs typically have a file extension of ".tar". However, when they are compressed, they can have additional extensions to indicate the compression algorithm used. For example, a tarball compressed with gzip will have the extension ".tar.gz", and with bzip2, it will have ".tar.bz2".
🌐
lenovo.com
lenovo.com › home
Tarball:Create & Use Tarballs | What are the Benefits? | Lenovo US
🌐
TecMint
tecmint.com › home › linux commands › how to split large ‘tar’ archive into multiple files of certain size
How to Split a Large TAR File into Multiple Smaller Files
September 3, 2024 - You can split a potentially large tar file into multiple sub tar volumes using the tar -M -l -F switches.
🌐
StrongDM
strongdm.com › blog › security
How to Tar a File in Linux: Commands, Examples & Best Practices
October 24, 2025 - The --exclude option handles this elegantly: tar -cvf backup.tar --exclude='*.log' /home/user/. This command archives everything except log files, helping you maintain clean backups. For working across different locations, the -C option changes the working directory: tar -cvf archive.tar -C /path/to/first dir1 -C /path/to/second dir2. This approach maintains relative paths while combining content from multiple sources.
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › linux-unix › tar-command-linux-examples
Tar Command in Linux - GeeksforGeeks
May 13, 2026 - The tar command in Linux (short for Tape Archive) is a powerful tool used to create, view, extract, and manage archive files. It allows you to bundle multiple files and directories into a single archive while preserving permissions and directory structure.
🌐
Lenovo
lenovo.com › home
Tarball:Create & Use Tarballs | What are the Benefits? | Lenovo US
A tarball is a compressed archive file that contains multiple files and directories.
🌐
Institute for Advanced Study
ias.edu › math › computing › faq › how-to-make-an-archive-of-files-or-directory
How do I make an archive of many files or a directory? | Math Computing Group | Institute for Advanced Study
June 3, 2015 - The Tape Archive program (tar) is used to create a single file from many files. Tar files are not smaller (compressed) than the original files, they are the union of all files archived.
🌐
GNU
gnu.org › software › tar › manual › html_section › Using-Multiple-Tapes.html
GNU tar 1.35: 9.6 Using Multiple Tapes
If you want tar to cycle through a series of files or tape drives, there are three approaches to choose from. First of all, you can give tar multiple ‘--file’ options. In this case the specified files will be used, in sequence, as the successive volumes of the archive.
🌐
R Project
cran.r-project.org › doc › manuals › r-patched › R-admin.html
R Installation and Administration
install.packages can install a source package from a local .tar.gz file (or a URL to such a file) by setting argument repos to NULL: this will be selected automatically if the name given is a single .tar.gz file.
🌐
nixCraft
cyberciti.biz › nixcraft › howto › bash shell › how to extract multiple tar ball (*.tar.gz) files in directory on linux or unix
How to extract multiple tar ball (*.tar.gz) files on Linux / Unix - nixCraft
December 28, 2023 - # Extract multiple tar ball files to /home/vivek/mydata/ directory # for f in *.tar.xz; do tar -xvfC /home/vivek/mydata/ "$f"; done # OR # cat *.tar.bz2 | tar jxvfc /home/vivek/mydata - -i
🌐
The Linux Documentation Project
tldp.org › LDP › abs › html › filearchiv.html
File and Archiving Commands
Unprintable binary characters in ... shar file. Shar archives still show up in Usenet newsgroups, but otherwise shar has been replaced by tar/gzip. The unshar command unpacks shar archives. The mailshar command is a Bash script that uses shar to concatenate multiple files into ...
🌐
Linux Today
linuxtoday.com › home › developer
How to Split Large tar Archive into Multiple Files of Certain Size | Linux Today
June 21, 2021 - In this how-to guide, we shall briefly explore the creation of archive files and splitting them into blocks of a selected size. We shall use tar, one of the most popular archiving utilities on Linux and also take advantage of the split utility to help us break our archive files into small bits.
🌐
Microsoft Support
support.microsoft.com › en-us › windows › zip-and-unzip-files-8d28fa72-f2f9-712f-67df-f80cf89fd4e5
Zip and unzip files | Microsoft Support
Some types of files, like JPEG images, are already highly compressed. If you zip several JPEG pictures into a folder, the total size of the folder will be about the same as the original collection of pictures. Windows 11, version 24H2 supports ZIP, RAR. 7z and TAR archive formats.
🌐
Unix Community
community.unix.com › unix for advanced & expert users
How to create a Tar of multiple Files in Unix and FTP the tar to Windows. - UNIX for Advanced & Expert Users - Unix Linux Community
August 25, 2008 - Hi, On my Unix Server in my directory, I have 70 files distributed in the following directories (which have several other files too). These files include C Source Files, Shell Script Source Files, Binary Files, Object F…
🌐
Udemy
blog.udemy.com › home › it & development › software development › tar command in linux: binding multiple files into a single unit
Tar Command in Linux: Binding Multiple Files Into a Single Unit - Udemy Blog
April 14, 2026 - The `tar` command in Linux is a built-in archiving tool that bundles multiple files into a single archive—and optionally compresses them. This article covers creating, extracting, and listing tar, gzip, and bzip2 archives with key syntax flags.
🌐
Xilinx
xilinx.com › https://www.amd.com/en.html › customer support › ise legacy tools and utilities - 14.7 windows 10 and windows 11
ISE Legacy Tools and Utilities - 14.7 Windows 10 and Windows 11
June 6, 2026 - File Type · TAR/GZIP · File Size · 15.52 GB · Verify Download 14.7 Windows 10 and Windows 11 · After downloading the installation file, you can complete download verification to prove the authenticity and integrity of the download. For details on how to verify, please refer to UG973 - Release Notes, Installation, and Licensing.