|
|
tar not working
|
|
|
|
Forum Regular
Join Date: Jan 2001
Location: Arkintoofle Minor
Status:
Offline
|
|
When I just enter "tar" I will get "tar: Failed open to read on /dev/nrst0 <No such file or directory>"
When I try to create an archive, I will get the same error message, but with a write error.
How do you use tar in the CLI?
|
You live and learn. At any rate, you live.
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Jan 2002
Location: Massachoosetts
Status:
Offline
|
|
You can look up the command syntax by just doing a "man tar" at the shell prompt, but to simplify it here it is:
tar -c to create an archive
tar -x extracts an archive
Example: tar -cvzf this-will-be-my-archive-name.tgz files-I-want-compressed
The -cvzf flags equal: create archive, verbose output, zip archive (gzip actually), force compression.
To extract: tar -xvzf file-I-want-uncompressed.tar.gz (or *.tgz)
Which extracts, verbosely, the gzipped archive (-f flag is for the gzip).
At least, that's the way I do it <img border="0" title="" alt="[Wink]" src="wink.gif" />
|
They laughed at my Mac, it had no CLI. They laughed at Linux, it had no GUI. I installed MacOS X, and shut them up.
|
|
|
|
|
|
|
|
Senior User
Join Date: Sep 2000
Location: Boston, MA
Status:
Offline
|
|
The tar command, without the 'f' (file) option, defaults to it's compiled
in default of /dev/nrst0 (nonrewinding scsi tape 0).
if you're going to use it to create .tar.gz type of 'tarballs', you
have to use the 'f' option as the other person pointed out.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Sep 2000
Location: in front of the keyboard
Status:
Offline
|
|
Also, I recommend using gnutar instead.
Tar messes up long filenames.
|
signatures are a waste of bandwidth
especially ones with political tripe in them.
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Jan 2001
Location: Arkintoofle Minor
Status:
Offline
|
|
Yes, it is working with the f -flag.
But it seems to matter in what order I specify the flags:
tar -cfv test1.tgz 1500 ant.mpg
produces an archive with the name v and complains that it couldn't find 1500 nor test1.tgz, while
tar -cvzf test1.tgz 1500 ant.mpg
produced an archive with the name test1.tgz and still didn't slice them every 1500 blocks.
It's a pity there are no examples for tar in the man command. And the same man page displays
for the gnutar.
|
You live and learn. At any rate, you live.
|
|
|
|
|
|
|
|
Senior User
Join Date: Sep 2000
Location: Boston, MA
Status:
Offline
|
|
-f archive Filename where the archive is stored. Defaults to
/dev/rst0
The options to tar are position dependent.
If you give -f, the next token on the line must be the filename.
If you give -b, the next token must be the blocking factor.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Sep 2001
Location: Chico, CA and Carlsbad, CA.
Status:
Offline
|
|
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">Originally posted by howardm4:
<strong>-f archive Filename where the archive is stored. Defaults to
/dev/rst0
The options to tar are position dependent.
If you give -f, the next token on the line must be the filename.
If you give -b, the next token must be the blocking factor.</strong></font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">You can separate the flags to make it more simple... Example:
tar -c -f test1.tgz -b 1500 /file/to/be/tarred
You can split each flag up and have each flags parameters directly following the flag, that way it's easier to read and follow.
<small>[ 06-24-2002, 02:01 PM: Message edited by: [APi]TheMan ]</small>
|
"In Nomine Patris, Et Fili, Et Spiritus Sancti"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|