[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Tar

Posted on 2004-11-10
6
Medium Priority
?
580 Views
Last Modified: 2010-04-21
How do you tar a file in Linux?
0
Comment
Question by:jfeltus
4 Comments
 
LVL 97

Expert Comment

by:Lee W, MVP
ID: 12548950
type
tar --help
or man tar
for instructions on how to use tar.
0
 
LVL 3

Accepted Solution

by:
woof-dog earned 100 total points
ID: 12549161
tar -(options) tarfilename.tar /source/of/fileorfiles!

For the options type

man tar

that will tell you.  though -cvf would be enough to create a tar file.
0
 
LVL 38

Expert Comment

by:wesly_chen
ID: 12550417
$ tar cvf filename.tar <file or directory>
Then it will create filename.tar for you.

Use
$ tar tvf filename.tar
to see the content of a tar file

And
$ tar xvf filename.tar
to untar (unpack) the filename.tar

Regards,

Wesly
0
 
LVL 10

Assisted Solution

by:Luxana
Luxana earned 100 total points
ID: 12552531
just keep in mind that tar by it self is without compresion !

to make files with compresion you can tar like this:

 $ tar cvzf filename.tar.gz <file or directory> or file
or
 $ tar cvjf filename.tar.bz2 <file or directory> or file
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses
Course of the Month20 days, 8 hours left to enroll

868 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question