Unix/Linux Go Back    

SCO Santa Cruz Operation (SCO) was a software company based in Santa Cruz, California which was best known for selling three UNIX variants for Intel x86.

Tar exclude


unix sco tar

Thread Tools Search this Thread Display Modes
Old Unix and Linux 01-26-2010
haezeban haezeban is offline
Registered User
Join Date: Sep 2009
Last Activity: 11 August 2011, 7:13 AM EDT
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Tar exclude


We work on a UNIX SCO SCO_SV Release = 3.2v5.0.5.
I have a folowing structure


I use following tar to backup the /u/usr/lpp directory

cd /u/usr/lpp
tar cvf /u/usr/backup/backup.tar .

Now I want to exclude the subdirectory SQL.
I tried everything but nothing works

tar cvf /u/usr/backup/backup.tar --exclude=./SQL .
tar cvf /u/usr/backup/backup.tar --exclude='./SQL' . 
tar cvf /u/usr/backup/backup.tar --exclude=.u/usr/lpp/SQL .
tar cvf /u/usr/backup/backup.tar --exclude=./SQL /* .
tar cvf /u/usr/backup/backup.tar . --exclude=./SQL

Can somebody point me out.
Thanks a lot.

Last edited by pludi; 01-26-2010 at 06:34 AM.. Reason: code tags, please...
Sponsored Links
Old Unix and Linux 01-26-2010
jgt's Unix or Linux Image
jgt jgt is offline Forum Advisor  
Registered User
Join Date: Apr 2007
Last Activity: 13 January 2017, 9:03 PM EST
Location: 44.21.48N 80.50.15W
Posts: 1,904
Thanks: 1
Thanked 246 Times in 233 Posts
The exclude option is Linux option, not SCO.

list=`ls  |grep -v SQL`
tar cvf backup.tar $list

Last edited by jgt; 01-26-2010 at 10:09 AM..
Sponsored Links
Old Unix and Linux 01-26-2010
edfair edfair is offline
Registered User
Join Date: May 2008
Last Activity: 16 January 2017, 9:37 AM EST
Location: Tucker GA
Posts: 187
Thanks: 0
Thanked 20 Times in 20 Posts
I'll make the suggestion that you use the backup package "microlite edge" for a more reliable backup solution with the ability to exclude files and directories. And it has the ability to verify the backups.
Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Exclude list decamposem UNIX for Dummies Questions & Answers 3 12-02-2008 12:56 PM
tar exclude list Tirmazi Solaris 2 09-20-2008 12:53 PM
du (exclude files) the_learner UNIX for Advanced & Expert Users 1 07-17-2007 03:06 PM
Exclude & Zip dreams5617 Shell Programming and Scripting 1 02-11-2007 08:01 PM
tar: how to exclude subdirectories? kymberm Filesystems, Disks and Memory 7 10-15-2002 04:53 PM

All times are GMT -4. The time now is 05:44 PM.