LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 04-08-2006, 06:26 PM   #1
UltramaticOrange
LQ Newbie
 
Registered: Aug 2005
Posts: 26

Rep: Reputation: 15
Exclude file types in smbclient tar


I've got a relitivly simple bash script that tries to connect to a remote computer on the network, if it finds the other computer, it runs the line

smbclient //$domain/$dir -A $authFile -TXc $bakDir$domain$us$dir.tar /My\ Documents/My\ Music

This sucessfully does the backup and excludes anything in the 'My Music' directory, however, while testing the bash script on my girlfriends machine, I realized that I REALLY need to be able to exclude certain file types (such as avi, mp3, ogg, mpg, wmv, etc) and I'm wondering the correct syntax.

I set up a little test area and tried the following which did not work:

smbclient //fake_comp_name/bt -A /mnt/hdb/.adrong.bak/auth.txt -TXc /home/adrong/tmp.tar *.avi *.mp3

thanks for any help.
 
Old 04-09-2006, 04:11 PM   #2
UltramaticOrange
LQ Newbie
 
Registered: Aug 2005
Posts: 26

Original Poster
Rep: Reputation: 15
It took some digging to find the answer...

I needed to also use the regular expression parameter 'r' (although this is a misnomer as they only support '*' and '?') so my above (non working) line becomes

smbclient //fake_comp_name/bt -A /mnt/hdb/.adrong.bak/auth.txt -TXrc /home/adrong/tmp.tar *.avi *.mp3

The resource that I used warned that if Samba was not compiled with the 'HAVE_REGEX_H' parameter, you'll have some performance issues.

Last edited by UltramaticOrange; 04-09-2006 at 04:12 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TAR: Unpack file, exclude a folder Smeerbalg Linux - Software 1 01-29-2006 07:59 AM
tar --exclude --exclude-from cefn Linux - Software 4 10-11-2005 07:31 PM
tar --exclude-from=FILE GATTACA Programming 1 07-29-2005 12:25 PM
tar exclude-from drisay Slackware 1 12-23-2004 01:10 PM
tar --exclude for subdirectories mrtwice Linux - Software 2 10-23-2003 12:50 PM


All times are GMT -5. The time now is 04:16 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration