Linked Questions

4
votes
2answers
8k views

rsync: how to include files with name ending in a specific string [duplicate]

Possible Duplicate: Rsync filter: copying one pattern only I would like to use rsync to transfer all files from a server (or server-via-ssh) which have a specific ending string, such as a file ...
0
votes
2answers
2k views

Can anyone tell me why rsync is no copying files from the source's subfolders? [duplicate]

I've been trying to use rsync to simply copy all my TIF image files from the current folder onto a 'HR' folder under 'Documents' with no success so far, by the following command: rsync -r *.tif /home/...
0
votes
1answer
2k views

Rsync only files matching pattern [duplicate]

It is inconceivable that this is proving to be so difficult but I'm trying to use rsync to copy only files matching a specific pattern. Specifically, copy files in all subdirectories matching "*000....
1
vote
0answers
30 views

Rsync exclude folder [duplicate]

so it seems like there are others with the same problem, but I couldn't find the right solution for myself. What I want to do: Rsync all files with pattern .log. but exclude a directory Here is my ...
54
votes
6answers
107k views

How to copy some, but not all files?

So, you can use the * as a wild card for all files when using cp within context of a directory. Is there a way to copy all files except x file?
51
votes
1answer
46k views

Delete extraneous files from dest dir via rsync?

Say I have SRC 001.jpg 002.jpg 001.txt a.zip DEST hello.jpg rsync -d --delete SRC:{*.jpg,*.txt} DEST It doesn't remove hello.jpg from DEST, any idea how to archive this?
36
votes
1answer
44k views

RSync - Excluding a particular subdirectory and its children where the subdirectory exists at different levels

G'Day, I am using rsync to recursively sync a remote folder tree that looks something like the following: /folderA/a1/cache /folderA/a1/cache/A1 /folderA/a1/cache/A2 /folderA/a1/somefolder /folderA/...
32
votes
3answers
33k views

How to rsync multiple source folders

I want to rsync multiple sources and I wonder the best way to achieve that. e.g. /etc/fstab /home/user/download I thought about 3 solutions : Solution 1 multiple call to rsync rsync -a /etc/...
15
votes
1answer
17k views

How to include files that are excluded in an rsync

I'm trying to set up an rsync that excludes all .* files except for .htaccess but unfortunately, this doesn't work: rsync -avP --exclude=".*" --include="./.htaccess" ./. user@server:/dir Is it ...
7
votes
1answer
26k views

rsync all directories that start with a specific digit

I have directory loaded with thousands of sub directories: /home/tmp/ 1 12 123 1234 2345 234 3456 345 34 ...
7
votes
5answers
18k views

How to exclude numeric directories with rsync?

I know rsync has an --exclude option which I use quite frequently. But how can I specify that it should exclude all "numeric" directories? In the directory listing below I would like to only have it ...
4
votes
1answer
11k views

What is the difference between `dd`, `cp` and `rsync`? [closed]

Besides the explanations from the man pages and --help information, in which way do the commands dd, cp and rsync differ when used to copy files? In which context is each of these superior to the ...
8
votes
3answers
3k views

How can I copy a subset of files from a directory while preserving the folder structure?

I want to move some subset of files from dirA to dirB (let's say files with "blah" in the filename), but I want all the nested directories to be the same in the new location. How can I do that?
5
votes
3answers
4k views

recursively copy only images and preserve path

I'm working on a website migration. I have a scrape of the site, with all the files and directory structure as you would see them in the URL. I want to pull all images, maintaining the directory ...
2
votes
2answers
13k views

Copy .txt files in a certain directory

I have an issue in copying my file in my directories. I have .txt and .jpeg files in a lot of directories, and I want to copy only the .txt files according to the directory. For example, I have this: ...

15 30 50 per page