Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TAR problem forgot command.

Status
Not open for further replies.

lblauen

Technical User
Aug 13, 2002
69
I need to get a list of files that where tared to a tape and capture it to a file. I have tried the following and got nothing. Whats wrong Please??

tar -vtf /dev/rmt0 >>tape.txt
also tried
tar -vtf /dev/rmt0 >> tape.txt 2>1&


Help PLease
 
First arg to tar must be one of 't', 'v' or 'c'. Try [tt]man tar[/tt]
 
Oops! I meant 'x', 't', or 'c' (also 'r' or 'u' - but don't do that!)
 
ok I changed it to

tar -tvf /dev/rmt0 >> tape.txt This doesn't work

tar -tvf /dev/rmt0 | tee -a tape.txt this doesn't work

tar -tvf /dev/rmt0 >>tpae.txt 2>1& this doesn't work

tar -tvf /dev/rmt0 works to screen but I need it in a file.
 
do you get any output in tape.txt ?
is the tape.txt file created ?
 
tar -tvf /dev/rmt0 > tape.txt should work - Check your write permissions to the directory.
"Doesn't work" isn't very helpful - please post the errors.
HTH Dickie Bird (:)-)))
 
The file is there. Permissions are 755. But there is nothing going into the file. Its blank. All I want is a listing of the files in the tar to a file.
 
"tar -tvf /dev/rmt0 works to screen but I need it in a file."
So redirection to a file MUST work - unless I've missed something !
WEIRD ! Dickie Bird (:)-)))
 
Use a single redirection - '>'
tar -tvf /dev/rmt0 > tar1.out

Can you create another file in the filesystem/directory where the ouptut is going ?
 
I tried the single > but that didn't create output in the file. The file name gets created. I don't think that we can direct the output list to a file. I have tried all of the suggestions listed but nothing works. I can output to the screen. I finally captured all 60 pages of the listing to a file by cutting and pasteing. I hope I don't need to do this again. Tar command should be able to list out to a file maybe someone will figure it out. Thanks for the help anyways.
 
Hi,
check that filesystem where you want to write tar output
has free space.
Regards Boris.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top