Monday, November 3, 2014

How to create a tarball - short description

To create a tarball, for example of an Oracle Home, do the following:
# become root
su - 
# cd to the directory in which you keep your files you'd like to tar up:
cd /u01/oracle/product/11204
# create the tarball, place it in the parent directory:
tar cvf ../oracle11204.tar *

You could also add compression at the same time:
tar -cvzf ../oracle11204.tar.tgz .
To create a tarball of the directory /tmp/dbscr and any file(s) in it:
cd /tmp
tar cvf mytarball.tar dbscr
dbscr/
dbscr/file1.txt
dbscr/file2.rsp
dbscr/file3.ora

No comments:

Post a Comment