i have lot of directories which are needed to be transferred to a LINUX workstation. to do this i need to tar the directories. please let me know how to tar the directories in Sun Solaris.
where /tmp/directories.tar is the name of the tar file you want to create, and names, of, and directories are, well, names of directories.
Usually you will also want to gzip or bzip2 compress the tar file; some tar commands even have built-in options to do that at the same time as creating the tar archive. Consult your local manual page for the gory details.
Make sure you tar these directories up using relative links
eg
rather than
When you untar them again, change into the directory you want them to go to, then run the tar xf to unpack.
By default tar extracts files into the cirrent dir - unless you have used absolute paths when creating the tar, in which case it depends on the implementation of tar as to what it will do.
also could ypu please tell me how to untar the file in a specified directory?
tar xvf {filename} will tar the file in current directory.
If you want to extract in some other directory, cd to that directory and type
tar xvf {PATH}/{filename}
and the untarred file will be created in pwd
Quick question,
is it possible to make a Tar of completely directory and placing the tar file in it (will this cause even the tar file to tarred ?)
sample:
/opt/freeware/bin/tar -cvf - /oracle | gzip > /oracle/backup.tgz
will the tar file backup.tgz also include backup.tgz ?
i tried... (5 Replies)
I want to backup all the directory tress, including hidden directories, without copying any files.
find . -type d gives the perfect list.
When I tried tar, it won't work for me because it tars all the files.
find . -type d | xargs tar -cvf a.tar
So i tried rsync.
On my own test box, the... (4 Replies)
HI,
if I have a tarfile called pmapdata.tar that contains
tar -tvf pmapdata.tar
-rw-r--r-- 0/0 21 Oct 15 11:00 2009 /var/tmp/pmapdata/pmap4628.txt
-rw-r--r-- 0/0 21 Oct 14 20:00 2009 /var/tmp/pmapdata/pmap23752.txt
-rw-r--r-- 0/0 1625 Oct 13 20:00 2009... (1 Reply)
I am new to Sun.
I brought Sun Fire 280R to practice UNIX. What are the requirements for the monitor/CRT? Will it burn out old non-Sun CRTs? Does it need LCD monitor?
Thanks. (3 Replies)
Hey there,
I am starting a Computer Science Foundation year at the end of this month and am trying to get a little bit ahead of the game. I have always wanted to learn Unix and am currently struggling with creating a boot disc to run Solaris (I have chosen to study this) from as opposed to... (0 Replies)
Hi,
Is there any utility to compress an entire directory on a Sun Solaris 5.7 ? Something like "compressdir" on other flavours of Unix ?
Thanks (4 Replies)