Sponsored Content
Top Forums Shell Programming and Scripting Achieving group by logic via Unix Post 302134876 by ajcannon on Tuesday 4th of September 2007 06:03:06 AM
Old 09-04-2007
Not quite right

Quote:
Originally Posted by donovan
Hi Guy`s I`m a newbie to Unix and I`m starting to love it

I got stuck donig backups of tar files to tape

I use this to find all tar files
find . -name '*.tar.*' > output
in output there would be n of file eg. 6
the size output is 156 but tar files are:
9.3M Jul 18 09:48 arch_done_032007.tar.gz
25M Jul 18 09:53 arch_done_042007.tar.gz
67M Jul 18 10:01 arch_done_052007.tar.gz
192M Jul 18 10:27 arch_done_062007.tar.gz
291M Aug 2 11:05 arch_done_072007.tar.gz
544M Sep 3 12:05 arch_done_082007.tar.gz
I then tar output to tape using this command
tar -cvf /dev/rmt/0 output
response is
a 2.0K Sep 3 18:47 output

can you please help me on this matter

thanks donovan
You are not going about his the right way - I guess your newness to Unix is to blame.
Your find command will simply create a file called output with the names of the files found in it. your 'tar -cvf /dev/rmt/0 output' command will - if successful - just write the file output to tape - not the tar files.
If you want ot write the gzipped (.gz) files to tape then you have to include the names in the tar command - EG tar -cvf /dev/rmt/0 abc.tar.gz
If you want to exptract te contents of the tar.gz file you will have to 'gunzip' it first to get a tar file and then extract with tar -xvf <tar file name>

Start a thread with the 'New Thread' button at the top of the forum page
 

2 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Encrypt Unix Logic

Hi All, i have written small tool with the help of Unix & Oracle. Now I want to keep the logic with me for sometime, however at the same time want to distribute the tool to large audience. Can anyone suggest me, how I can hide the logic, any encrypting command etc. Quick reply would be appreciated.... (1 Reply)
Discussion started by: susau_79
1 Replies

2. Shell Programming and Scripting

UNIX shell scripting logic

This is my source file and required output is mentioned as below. Any input on how to proceed. start name=vamsi phone=123456789 mailid=abc@gmail.com adress:-india end start name=vamsi1 phone=1234567890 mailid=abc1@gmail.com adress:-usa end required output:... (15 Replies)
Discussion started by: vamsi.valiveti
15 Replies
tar(4)							     Kernel Interfaces Manual							    tar(4)

NAME
tar - format of tar tape archive DESCRIPTION
The header structure produced by (see tar(1)) is as follows (the array size defined by the constants is shown on the right): All characters are represented in ASCII. There is no padding used in the header block; all fields are contiguous. The fields magic, uname, and gname are null-terminated character strings. The fields name, linkname, and prefix are null-terminated char- acter strings except when all characters in the array contain non-null characters, including the last character. The version field is two bytes containing the characters (zero-zero). The typeflag contains a single character. All other fields are leading-zero-filled octal numbers in ASCII. Each numeric field is terminated by one or more space or null characters. The name and the prefix fields produce the pathname of the file. The hierarchical relationship of the file is retained by specifying the pathname as a path prefix, with a slash character and filename as the suffix. If the prefix contains non-null characters, prefix, a slash character, and name are concatenated without modification or addition of new characters to produce a new pathname. In this manner, path- names of at most 256 characters can be supported. If a pathname does not fit in the space provided, the format-creating utility notifies the user of the error, and no attempt is made to store any part of the file, header, or data on the medium. SEE ALSO
tar(1) STANDARDS CONFORMANCE
tar(4)
All times are GMT -4. The time now is 03:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy