Sponsored Content
Full Discussion: tar in a script
Top Forums UNIX for Dummies Questions & Answers tar in a script Post 302193769 by frozentin on Sunday 11th of May 2008 02:27:39 AM
Old 05-11-2008
zapper222:

Could it be that you didn't specify "f" on the CLI? If so, then tar sends its o/p to the first tape drive by default.

tar's behavior could be different on your platform, but this holds true for Solaris (/dev/rmt/0).
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to write script in tar

i have the script.in this script comprees formatlike tar and insert to another directory and another sever.and how to write this process in script . iam new for unix how to do this process. please helpmea naveen.g (1 Reply)
Discussion started by: naveeng.81
1 Replies

2. UNIX for Advanced & Expert Users

Tar utility (untar a .tar file) on VxWorks

Hi All Can someone pls guide me if there any utility to compress file on windows & uncompress on vxworks I tried as - - compressed some folders on windows ... i created .tar ( to maintain directory structure ) and compressed to .gz format. - on VxWorks i have uncompressed it to .tar... (1 Reply)
Discussion started by: uday_01
1 Replies

3. Shell Programming and Scripting

using tar via su in a script issue !!!

I am trying to implement the below command in my shell script su - $PROCESS -c `tar -tvf $file|tee -a $LOG/$file.log` The idea is to get the tar output on the screen and at the same time it should put the output in the log file. Problem is: 1) I donot get the output on the screen. 2)... (3 Replies)
Discussion started by: kpatel786
3 Replies

4. UNIX for Advanced & Expert Users

How to create a Tar of multiple Files in Unix and FTP the tar to Windows.

Hi, On my Unix Server in my directory, I have 70 files distributed in the following directories (which have several other files too). These files include C Source Files, Shell Script Source Files, Binary Files, Object Files. a) /usr/users/oracle/bin b) /usr/users/oracle... (1 Reply)
Discussion started by: marconi
1 Replies

5. UNIX for Dummies Questions & Answers

tar -cvf test.tar `find . -mtime -1 -type f` only tar 1 file

Hi all, 4 files are returned when i issue 'find . -mtime -1 -type f -ls'. ./ora_475244.aud ./ora_671958.aud ./ora_934052.aud ./ora_934050.aud However, when I issued the below command: tar -cvf test.tar `find . -mtime -1 -type f`, the tar file only contains the 1st file -... (2 Replies)
Discussion started by: ahSher
2 Replies

6. Shell Programming and Scripting

tar command dont tar to original directory

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)
Discussion started by: borderblaster
1 Replies

7. Shell Programming and Scripting

Need help with tar script

The following script is supposed to look at a list of files and folders and tar them all up. Ofcourse you have to strip off everything to the left of the file or folder to tar only that object. My problem is that when I do that my script no longer knows how to find the file or folder. Is there a... (0 Replies)
Discussion started by: mj12net_brian
0 Replies

8. Shell Programming and Scripting

tar command to explore multiple layers of tar and tar.gz files

Hi all, I have a tar file and inside that tar file is a folder with additional tar.gz files. What I want to do is look inside the first tar file and then find the second tar file I'm looking for, look inside that tar.gz file to find a certain directory. I'm encountering issues by trying to... (1 Reply)
Discussion started by: bashnewbee
1 Replies

9. UNIX for Dummies Questions & Answers

Script help - TAR

*****CAN'T CHANGE THE TOPIC NAME******** I'm using "zip" instead Hi. I'm trying to make my script use "zip" and i want it to compress all the files in a directory to individual zip files... but i can't really figure out how. i have googled around. tried some different things... but i can't get... (6 Replies)
Discussion started by: vYN
6 Replies

10. UNIX for Dummies Questions & Answers

Do I need to extract the entire tar file to confirm the tar folder is fine?

I would like to confirm my file.tar is been tar-ed correctly before I remove them. But I have very limited disc space to untar it. Can I just do the listing instead of actual extract it? Can I say confirm folder integrity if the listing is sucessful without problem? tar tvf file1.tar ... (1 Reply)
Discussion started by: vivien_chu
1 Replies
mt(1)								   User Commands							     mt(1)

NAME
mt - magnetic tape control SYNOPSIS
mt [-f tapename] command... [count] DESCRIPTION
The mt utility sends commands to a magnetic tape drive. If -f tapename is not specified, the environment variable TAPE is used. If TAPE does not exist, mt uses the device /dev/rmt/0n. OPTIONS
The following options are supported: -f tapename Specifies the raw tape device. OPERANDS
The following operands are supported: count The number of times that the requested operation is to be performed. By default, mt performs command once. Multiple operations of command can be performed by specifying count. command The following available commands that can be sent to a magnetic tape drive are supported. Only as many characters as are required to uniquely identify a command need be specified. asf Specifies absolute space to count file number. This is equivalent to a rewind followed by a fsf count. bsf Back spaces over count EOF marks. The tape is positioned on the beginning-of-tape side of the EOF mark. bsr Back spaces count records. bssf Back spaces over the requested number of sequential file marks. Sequential file marks are where the file marks are one right after the other with no other blocks of any kind between the file marks. The number argument specifies how many sequential file marks to which to space. For example, bssf 4 searches backwards to the first place where there are 4 sequential file marks and positions to the BOP side of the 4th file mark. This command is not supported by all drives. eof Writes count EOF marks at the current position on the tape. weof fsf Forward spaces over count EOF marks. The tape is positioned on the first block of the file. fsr Forward spaces count records. fssf Forward spaces the over requested number of sequential file marks. Sequential file marks are where the file marks are one right after the other with no other blocks of any kind between the file marks. The number argument specifies how many sequential file marks to which to space. For example, fssf 4 searches forwards to the first place where there are 4 sequential file marks and positions after the 4th file mark. This command is not supported by all drives. load Requests drive load and thread current media. Not supported by all drives. lock Prevents media removal. nbsf Back spaces count files. The tape is positioned on the first block of the file. This is equivalent to count+1 bsfs ollowed by one fsf. seek Positions to requested logical tape position. tell Gets and prints current logical tape position. unlock Allows media removal. If count is specified with any of the following commands, the count is ignored and the command is performed only once. config Reads the drives current configuration from the driver and displays it in st.conf format. See st(7D) for defini- tion of fields and there meanings. eom Spaces to the end of recorded media on the tape. This is useful for appending files onto previously written tapes. erase Erases the entire tape. Some tape drives have option settings where only portions of the tape can be erased. Be sure to select the cor- rect setting to erase the whole tape. Erasing a tape can take a long time depending on the device and/or tape. Refer to the device specific manual for time details. forcereserve Attempts to break a SCSI II reserve issued by another initiator. When this command completes, the drive is not reserved for the current initiator, but is available for use. This command can be only be executed by those with super-user privileges. offline Rewinds the tape and, if appropriate, takes the drive unit off-line by unloading the tape. rewoffl release Re-establishes the default behavior of releasing at close. reserve Allows the tape drive to remain reserved after closing the device. The drive must then be explicitly released. retension Rewinds the cartridge tape completely, then winds it forward to the end of the reel and back to beginning-of- tape to smooth out tape tension. rewind Rewinds the tape. status Prints status information about the tape unit. Status information can include the sense key reported by the drive, the residual and retries for the last opera- tion, the current tape position reported in file number, and the number of blocks from the beginning of that file. It might also report that WORM media is loaded in that drive. EXIT STATUS
0 All operations were successful. 1 Command was unrecognized or mt was unable to open the specified tape drive. 2 An operation failed. FILES
/dev/rmt/* magnetic tape interface ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
tar(1), tcopy(1), ar.h(3HEAD), attributes(5), mtio(7I), st(7D) BUGS
Not all devices support all options. Some options are hardware-dependent. Refer to the corresponding device manual page. mt is architecture sensitive. Heterogeneous operation (that is, SPARC to x86 or the reverse) is not supported. SunOS 5.11 21 Jun 2007 mt(1)
All times are GMT -4. The time now is 08:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy