How do I create a tar archive of a directory?

A common task in UNIX operating systems is creating an archive of many files or directories in a single file. The tar command is one option for archiving and has many options and can do many things.

In a simple example, you can create a file called archive.tar of all the files and subdirectories in the current directory with the following command: 

tar cf archive.tar *

Note that this file is different from a zip archive commonly used in Windows environments because it is uncompressed.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How do I launch SSH or Shell Access tools?

Overview SSH (Secure Shell) is a program to log into another computer/server over a network...

What are some commonly used UNIX shell commands?

Creating a Directory   You can create a directory by using the mkdir command. For example, to...

How do I find information on other UNIX commands?

The UNIX command line interface is wonderful. With that power comes complexity if only in the...

How do I create a symbolic link?

A symbolic link is a pointer to another file or directory. It can be used just like the original...

How do I find files and directories?

To search the current directory and all subdirectories for a folder or file, use the following...