I am trying to copy the directory but only with the specific files.
sudo scp -r user@ip:'ls /nas1/logs/tomcat/dev-main/dev-main*|grep localhost_access_log.2023-09-21.txt' /home/test
If the files are located like this at remote server,
/nas1/logs/tomcat/dev-main/dev-main-1111/localhost_access_log.2023-09-21.txt
/nas1/logs/tomcat/dev-main/dev-main-1234/localhost_access_log.2023-09-21.txt
then I want to copy the files like this to the local server.
/home/test/dev-main-1111/localhost_access_log.2023-09-21.txt
/home/test/dev-main-1234/localhost_access_log.2023-09-21.txt
Can I use grep with scp command?
scp
. Do you haversync
or eventar
installed?