Sponsored Content
Top Forums Shell Programming and Scripting How to process the files using .tar.gz files in script Post 302116421 by bmkreddy on Thursday 3rd of May 2007 07:02:37 PM
Old 05-03-2007
How to process the files using .tar.gz files in script

Hi,

I have some file in /users/xyz directoty with .tar.gz extension. i need to find these files and if found in need to run other commands. I now the command for finding files,but how to put if condition ?please help me


Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

bash - batch script for extracting one file from multiple tar files

so i have hundreds of files named history.20071112.tar (history.YYYYMMDD.tar) and im looking to extract one file out of each archive called status_YYYYMMDDHH:MM.lis here is what i have so far: for FILE in `cat dirlist` do tar xvf $FILE ./status_* done dirlist is a text... (4 Replies)
Discussion started by: kuliksco
4 Replies

2. Shell Programming and Scripting

Script to tar up old log files

Hell All! I need help writing a script for my job. I never really wrote alot of scripts but I guess it a first time for everything. I need to write a simple script that goes out to our log file directory on our servers and tar and compress them. I need to know how to add an date time stamp to tell... (5 Replies)
Discussion started by: aojmoj
5 Replies

3. 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

4. Shell Programming and Scripting

Need script to tar files older than 30 days

Hi all. Here's my situation: I have performance reports that run every 30 minutes saved in the format: stats_report_11251000.txt stats_report_11251030.txt stats_report_11251100.txt stats_report_11251130.txt (Obviously run at Nov 25 10 AM, 10:30 AM, 11 AM and so on...) I would... (2 Replies)
Discussion started by: jamie_collins
2 Replies

5. 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

6. Shell Programming and Scripting

Backup script to split and tar files

Hi Guys, I'm very new to bash scripting. Please help me on this. I'm in need of a backup script which does the ff. 1. If a file is larger than 5GB. split it and tar the file. 2. Weekly backup file to amazon s3 using s3rsync 3. If a file is unchanged it doesn't need to copy to amazon s3 ... (4 Replies)
Discussion started by: ganitolngyundre
4 Replies

7. Shell Programming and Scripting

Issue in Untaring the Tar files Script

I have written a below script to untar the tar files from /tmp/tarfiles/ directory. # cat /tmp/tarfiles/script.sh #!/bin/sh cd /tmp/tarfiles/ TFL="tar_files_list.txt" TCF="tar_completed_list.txt" ls -l *.tar | awk '{print $9}' > $TFL for i in `cat $TFL` do if then for j in... (2 Replies)
Discussion started by: thomasraj87
2 Replies

8. Shell Programming and Scripting

How to tar files inside a script?

Hi , I have a file which contains few file names. I need to tar those files but am unable to do inside the script. Any help will be useful. cat /tmp/test aa.txt bb.txt cc.txt I have tried the below code but its not working. for i in `cat /tmp/test';do tar -cvf TEST.tar $i;done (9 Replies)
Discussion started by: rogerben
9 Replies

9. Solaris

Command to remove existing files in the tar files in Solaris 10

Hi, I am using solaris 10 OS.Please help me out with the commands needed in below two scenarios. 1)How to delete the existing files in the tar file. suppose i have a main tarfile named application.tar and it contains a file called ingres.tar. what is the command to remove ingres.tar... (2 Replies)
Discussion started by: muraliinfy04
2 Replies

10. Shell Programming and Scripting

How to create zip/gz/tar files for if the files are older than particular days in UNIX or Linux?

I need a script file for backup (zip or tar or gz) of old log files in our unix server (causing the space problem). Could you please help me to create the zip or gz files for each log files in current directory and sub-directories also? I found one command which is to create gz file for the... (4 Replies)
Discussion started by: Mallikgm
4 Replies
MAILHELP(1)						      General Commands Manual						       MAILHELP(1)

NAME
maildist, mailhelp, maillist, mailpatch - mailagent's commands SYNOPSIS
maildist address system [ version ] mailhelp [ address ] maillist [ address ] mailpatch address system version patchlist DESCRIPTION
These commands are not intended to be run directly by a user. They may appear in any mail whose subject is set to Command. Such a mail will be processed by the mailagent(1), which will extract all lines beginning with @SH, followed by one of the above commands. The mailagent first sets environment variables that will be used by every commands. Maildist is used to mail a whole distribution to the given address. The version number may be ommitted if the system has no version speci- fied !! Maildist looks for the Spool/distribs file to find where the distribution is located. If it has been archived, the file name extension is used to guess how the archive will be restored: .cpio archive is a cpio archive .tar archive is in tar format .cpio.Z compressed cpio archive .tar.Z compressed tar archive Note that on file systems with short file names, the final .Z extension could be dropped. Therefore, compressed archives must be explicitely stated in the Spool/distribs file. Once the directory is found (or extracted), maildist looks for a .package file. If one is found, then it is assumed this distribution is under control of the dist 3.0 package, and the makedist commmand is called to actually mirror the source tree (makedist being part of dist 3.0). Otherwise, it looks for a MANIFEST file. If it finds one, only the files listed therein will be sent. Otherwise, all the files will be sent, excepted the binary executables and object files, the RCS sub-directories or RCS files, the private U subdirectory and the .package file, any core file or files in a bugs subdirectory. Then, the following algorithm is used: if no RCS file is found, the file is sent as-is. Otherwise, we look for a defined 'lastpat' symbol. If it is found, the corresponding revision is checked-out and sent. Otherwise, the last-revision on the default branch is exctracted, pro- vided that the corresponding working file is not found. The maildist command will not work if the system is tagged as an old one (with an o in the patches column of the distribs file). A message will be sent back to the user, explaining that only patches are available. Mailhelp sends help to the address (if ommitted, the return path of the mail is used). The help text is found in Spool/agenthelp. It should have been correctly set in the installation procedure, as explained in the mailagent(1) manual page. Maillist sends the list of available distributions, with current patchlevels if necessary. The Spool/distribs and Spool/proglist files are both used to build the list. Mailpatch sends one or more patches for a maintained distribution. The directory or the archive is found by scanning Spool/distribs. The bugs sub-directory must then hold the available patches. The patches may be stored in compressed form (with the ending .Z), as mailpatch knows about them and will uncompress the patch before sending. Patches for old systems are kept in a separate directory, either in normal or in compressed form. If the version number of the old system is x.y, then the directory must be named bugs-x.y and placed in the root directory of the system, just like bugs is. Whenever the user asks for an old system, mailpatch inserts a little note giving the latest version number for that system. NOTE
For a more accurate description of these commands (user's point of vue), you may want to have a look at the help file or send help to your- self using the mailhelp command. FORWARDING
When the author of a package wishes to relinquish all maintenance duty, he is most often stuck by the weight of the past: Configure scripts have his e-mail address hardwired (see unit MailAuthor.U) and Command messages for package registration and/or patch requests will continue to reach him. The answer to that is to leave a .forward file at the top of the package tree and commands will automatically forge new requests and for- ward them to the address listed in the .forward file. Now the recipient surely needs a mailagent at the other end to deal with forwarded requests! Only plain e-mail address(es) are allowed in the .forward. The "|command" processing hook is not supported, since it's not sendmail which interprets that file but the command itself. Forwarding applies to maildist, mailpatch and package commands only. FILES
~/.mailagent configuration file for mailagent. /usr/share/mailagent directory holding templates and samples. Spool/agenthelp help file Spool/distribs distribution list Spool/proglist comments for available distributions Spool/plsave records patchlevel of archived distributions Log/agentlog mailagent's log file BUGS
The proglist file ought to make a distinction between different versions of a same system. AUTHOR
Raphael Manfredi <Raphael_Manfredi@pobox.com> SEE ALSO
mailagent(1), package(1). ram MAILHELP(1)
All times are GMT -4. The time now is 08:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy