LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-17-2017, 09:01 AM   #1
horizn
Member
 
Registered: Jan 2015
Location: UK and Poland
Distribution: Slackware + Debian + Ubuntu
Posts: 146

Rep: Reputation: Disabled
Rsync syntax help


I need to rsync only .bin files younger than 1 day from folders beginning name with 14. and 11. but also containing sub-folders with different names.

I tried with:
Code:
rsync -Rarv  `find /mnt/NFS_SERVER/ftp/etv/ -type f -mtime -1` --prune-empty-dirs --include "14.*/"  --include="*.bin" --exclude="*" "/mnt/NFS_SERVER/ftp/abc/" "/home/ftp/abc/"
but end up with nothing.
 
Old 02-17-2017, 10:01 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 9,477

Rep: Reputation: 990Reputation: 990Reputation: 990Reputation: 990Reputation: 990Reputation: 990Reputation: 990Reputation: 990
Have you tried with find?

find <options> | xargs <command to operate on find's output>

sort of thing?
 
Old 02-24-2017, 08:10 AM   #3
horizn
Member
 
Registered: Jan 2015
Location: UK and Poland
Distribution: Slackware + Debian + Ubuntu
Posts: 146

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
Have you tried with find?

find <options> | xargs <command to operate on find's output>

sort of thing?
OK, solved this using:

rsync -dPt --ignore-existing --files-from=/tmp/files.txt /mnt/IP/ftp/source /home/ftp/destination
 
Old 02-25-2017, 05:10 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 9,477

Rep: Reputation: 990Reputation: 990Reputation: 990Reputation: 990Reputation: 990Reputation: 990Reputation: 990Reputation: 990
Glad you're sorted. I'm not sure if you have to be that specific with rsync, as it transfers nothing if the files are identical and it's very quick. It would only be sensible if yoiu had an awful lot of files.
 
  


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
[SOLVED] rsync syntax Sefyir Linux - Newbie 7 02-05-2017 12:50 AM
[SOLVED] Rsync With SSH Syntax? NotAComputerGuy Linux - Newbie 2 06-13-2013 05:13 PM
rsync syntax for local copy hoover93 Linux - Software 3 12-21-2012 03:39 AM
Rsync syntax question alexpacio Linux - Software 5 07-23-2007 07:27 PM
help with rsync exclude syntax please JacekZ Linux - General 2 07-08-2007 02:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:28 AM.

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