scp filter file?
by logging from LinuxQuestions.org on (#6F2DE)
Hello
I want to copy more than 100 files to another server with scp but I don't want to copy some files.
Since the number of files I don't want to copy is also high, I need to separate them and I need to separate another group of files
the files I don't want to copy start like this
data_01
data_02
.
.
.
data_09
and
text_01
.
.
text_15
the extensions of the files are the same, so it doesn't matter.
I tried the following, but I couldn't get the two conditions to work
scp * --exclude 'data_*' remotei,p.... did not work
scp -r [!data]* remoteip worked but I could not add the second exclude query
I want to copy more than 100 files to another server with scp but I don't want to copy some files.
Since the number of files I don't want to copy is also high, I need to separate them and I need to separate another group of files
the files I don't want to copy start like this
data_01
data_02
.
.
.
data_09
and
text_01
.
.
text_15
the extensions of the files are the same, so it doesn't matter.
I tried the following, but I couldn't get the two conditions to work
scp * --exclude 'data_*' remotei,p.... did not work
scp -r [!data]* remoteip worked but I could not add the second exclude query