LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-16-2006, 08:37 AM   #1
stillsen
LQ Newbie
 
Registered: May 2004
Posts: 1

Rep: Reputation: 0
cp .. all but xxx


Hello linux community,
I want to copy a lot of files from A to B by keeping the directory structure. Among these files are some of type .smr I don't want to copy.
I thought of some commd like cp-R or find "all but .smr" | cp "to B" but I don't get it.

Has anybody some advice?
(just command line please )

By the way, I'm not shure if it is the right forum....isn't there any for command line opperations?

Thanks a lot!

baba,
stillsen
 
Old 12-16-2006, 08:52 AM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
I'd probably use rsync for this. You can provide a list of exclude patterns using the --exclude-from=exclude_file option, and have a file with a bunch of patterns you don't want to copy, e.g. "exclude_file" might contain
Code:
/home/*/.Trash/
/home/*/.mozilla/firefox/*/Cache/
/home/*/.kde/share/apps/amarok/podcasts/
/home/*/.local/share/Trash/
Be sure to read the rsync manual page about excludes - you should know the difference between /pattern and /pattern/
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
"Error, some other host already uses address XXX.XXX.XXX.XXX" mwbb_support Linux - Networking 5 01-20-2014 08:59 AM
smbclient -M xxx.xxx.xxx.xxx Doesnt Work DiscreetControl Linux - Networking 7 12-28-2007 10:50 AM
Problem getting connection with a DLink Router with IP 10.xxx.xxx.xxx kezira Fedora 9 11-28-2005 10:31 PM
Problem getting connection with a DLink Router after setting static IP 10.xxx.xxx.xxx kezira Linux - Networking 1 11-09-2005 10:27 PM
Host XXX.XXX.XXX.XXX is not allowed to connect to this MySQL server ocavid Linux - Newbie 2 03-16-2005 09:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:57 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration