How to archive several files with tar?
James Cameron
jc at raven.bu.edu
Sun Jun 9 09:48:45 AEST 1991
>>>>> On 8 Jun 91 17:21:47 GMT, CSC9017043T%LUST1 at LURE.LATROBE.EDU.AU ("B.J SNOOPY, LATROBE UNIVERSITY, AUSTRALIA.") said:
|> Hi,
|> I am having a great deal of difficulty trying to tar a group of text
|> files to a single file. I have read the manual entries on this, but can't
|> make any sense of them. I would greatly appreciate it if someone would
|> help me out here..
|> Thanks.
|> Put your nose to the Grindstone. | B.J. Snoopy,
Take a look at this:
-jc- [raven: ~/temp] % touch test{1,2,3,4}
-jc- [raven: ~/temp] % ls
test1 test2 test3 test4
-jc- [raven: ~/temp] % tar cvf test.tar .
a ./test1 0 blocks
a ./test2 0 blocks
a ./test3 0 blocks
a ./test4 0 blocks
a ./test.tar 0 blocks
-jc- [raven: ~/temp] % ls
test.tar test1 test2 test3 test4
-jc- [raven: ~/temp] % rm test?
-jc- [raven: ~/temp] % ls
test.tar
-jc- [raven: ~/temp] % tar xvf test.tar
x ./test1, 0 bytes, 0 tape blocks
x ./test2, 0 bytes, 0 tape blocks
x ./test3, 0 bytes, 0 tape blocks
x ./test4, 0 bytes, 0 tape blocks
x ./test.tar, 0 bytes, 0 tape blocks
-jc- [raven: ~/temp] % ls
test.tar test1 test2 test3 test4
-jc- [raven: ~/temp] %
So, what you are looking for is basically:
% tar cvf file.tar .
to create tape archive of current directory.
Hope that helps!!!
jc
--
-- James Cameron (jc at raven.bu.edu)
Signal Processing and Interpretation Lab. Boston, Mass (617) 353-2879
------------------------------------------------------------------------------
"But to risk we must, for the greatest hazard in life is to risk nothing. For
the man or woman who risks nothing, has nothing, does nothing, is nothing."
(Quote from the eulogy for the late Christa McAuliffe.)
More information about the Comp.unix.questions
mailing list