Home | Fedora Core 4 Tutorial | Linux Tutorials | Linux Games | Linux Java | Linux Kernal | Linux Firewall | Linux Database | Linux Distributions | Linux Firewall GUI | Linux Distributions | Linux Firewall

 


 

Search Host

Monthly Fee($)
Disk Space (MB)
Register With us for Newsletter!
Visit Forum! Post Questions!
Jobs At RoseIndia.net!

Have tutorials?
Add your tutorial to our Java Resource and get tons of hits.

We offer free hosting for your tutorials. and exposure for thousands of readers. drop a mail
roseindia_net@yahoo.com
 
   

Tutorials

Java Server Pages

JAXB

Java Beans

JDBC

MySQL

Java Servlets

Struts

Bioinformatics

Java Code Examples

Interview Questions

 
Join For Newsletter

Powered by groups.yahoo.com
Visit Group! Post Questions!

Web Promotion

Web Submission

Submit Sites

Manual Submission?

Web Promotion Guide

Hosting Companies

Web Hosting Guide

Web Hosting

Linux

Beginner Guide to Linux Server

Frameworks

Persistence Framework

Web Frameworks

Free EAI Tools

Web Servers

Aspect Oriented Programming

Free Proxy Servers

Softwares

Adware & Spyware Remover

Open Source Softwares

Tutorial: Using tar command to Archiving/Unarchiving files

                         

This tutorial shows you how to use tar utility to Archiving/Unarchiving your files on linux/unix machine.

Introduction
tar command is very good tool for archiving and unarchiving files. The "tar" command stands for tape archive. The tar command can be used to write archives directly to tape devices, or you can use it to create archive files on disk. In many cases, tar archives are created on disk so it's easier to transport them across networks, such as the Internet.

The basic command for archiving files with the tar command is:

tar -cvf archive.tar file1 file2

or

tar -cvf archive.tar file1 file2  (for archiving everything in the directory) where: c - for creating a new file
  • v - displays the name of each file being archived
  • f -  for using the files name for achieving
  • file1, file2, ... are the names of files that are being archived

Archiving Directory

-C option is used to archive the directory using tar command. For example you want to archieve a called "mydir", so you will be using the following command:

tar -cvf archive.tar -C mydir

Unarchiving using tar command

You can use tar utility to unarchieve your tar files. Suppose you have a tar file called "myfile.tar" and you want to unarchieve it. Then the following command you will be using to unarchieve the file:

tar -xvf myfile.tar

                         

 

Search Tutorials

Linux Distributions

Fedora

Slackware
SuSe
Mandrake
Knoppix
Mepis
Debian
All Distors....
 

 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2004. All rights reserved.