1

I have multiple directories named by date (ex: 2017-09-05) and inside those directories multiple log.gz files from BRO IDS. I am trying to enter each directory, and get only specific log.gz files by name, and send those to a remote system using rysnc. A log file looks like this:app_stats.00:00:00-01:00:00.log.gz I am attempting to use wildcards to accomplish this.

Ex: rsync -avh --ignore-existing -e ssh -r /home/data/logs/2017-09-* {dns,http}.*.log.gz / root@10.23.xx.xx:/home/pnlogs/

This is close, but its just copying all the files in each folder and ignoring my attempt at just getting http and dns logs as seen in the example. Is this possible to do in one line? Would I need multiple?

David Hoelzer
  • 15,862
  • 4
  • 48
  • 67
Blitzkrieg
  • 11
  • 2
  • 1
    SO is for programming questions, not questions about using or configuring Linux. SuperUser.com or unix.stackexchange.com would be better places for questions like this. – Barmar Sep 05 '17 at 16:59
  • I will post over there, apologies. – Blitzkrieg Sep 05 '17 at 17:00

0 Answers0