![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Reg: Gzip | sam99 | Shell Programming and Scripting | 5 | 01-30-2008 07:43 AM |
| difference between 'compress' and 'gzip' | anandapani | UNIX for Dummies Questions & Answers | 3 | 12-15-2007 02:01 PM |
| gzip | mfran2002 | SCO | 1 | 12-01-2003 10:23 AM |
| using gzip | nattie_h | UNIX for Advanced & Expert Users | 2 | 11-15-2002 11:28 AM |
| compress --> gzip | 98_1LE | UNIX for Dummies Questions & Answers | 2 | 03-12-2001 01:51 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
gzip instead of compress
Duplicate threads merged jmc
Hi, I have a script wherein I want to use gzip instead of compress. # cat dly_appsfiles_bkp.ksh # # dly_appsfiles_bkp.ksh # date_stamp=`date +%m%d%y` base_dir=/u05/gld1 sub_dir=apps bkp_dir=/u00/backup/GLD1/APPS bkp_file_name=${sub_dir}_${date_stamp}.tar.Z echo "" echo "Starting Compressed Apps Files backup ..." echo "Compressed backup file name: ${bkp_dir}/${bkp_file_name}" echo "" cd ${base_dir} tar cvf - ${sub_dir} | compress > ${bkp_dir}/${bkp_file_name} echo "" cd $bkp_dir ls -ltr *.Z mailx -s "Done" abc@abc.com<<EOF Backup done EOF echo "" echo "Done." echo "" I'm new to shell scripting.Can someone please help me on how this can be modified? Thanks, Last edited by jim mcnamara; 06-16-2009 at 12:39 PM.. |
|
||||
|
use gzip instead of compress
Hi,
I need to modify a script wherein need to use gzip instead of compress. The script is # cat dly_appsfiles_bkp.ksh # # dly_appsfiles_bkp.ksh # date_stamp=`date +%m%d%y` base_dir=/u05/gld1 sub_dir=apps bkp_dir=/u00/backup/GLD1/APPS bkp_file_name=${sub_dir}_${date_stamp}.tar.Z echo "" echo "Starting Compressed Apps Files backup ..." echo "Compressed backup file name: ${bkp_dir}/${bkp_file_name}" echo "" cd ${base_dir} tar cvf - ${sub_dir} | compress > ${bkp_dir}/${bkp_file_name} echo "" cd $bkp_dir ls -ltr *.Z mailx -s "Done" abc@abc.com<<EOF Backup done EOF echo "" echo "Done." echo "" Please let me know how this can me modified? Thanks |
|
||||
|
change to this
Code:
tar cvf - ${sub_dir} | gzip - > ${bkp_dir}/${bkp_file_name}.gz
Code:
tar zcvf - ${sub_dir} > ${bkp_dir}/${bkp_file_name}.gz
|
|
||||
|
Hi,
The size of the backup file is 0 bytes. Its not copying any files for backup. -rw-r--r-- 1 appldev1 dba 0 Jun 29 08:34 oraInventory_062909.tgz This is on AIX. Regards, Narayan ---------- Post updated at 07:59 PM ---------- Previous update was at 06:18 PM ---------- tar zcvf - ${sub_dir} > ${bkp_dir}/${bkp_file_name}.gz does not seem to be working on AIX. Please suggest. Regards |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|