I am trying to find a way how to locate a certain folder.
Problem is that I don't know exact folder name in given time.
So I am looking to find a folder based on regex, based on date, for example in 17.50 that day or the moment when application finish. [see example below]
/application/qa/log/r52d4/20201020/20201020-17.59.49_r52d4_testuser
So with putty I am trying to connect to server and locate that folder name and save that folder name in a txt file for later usage.
pscp find / -type d -name 'r52d4' -P 22 -pw test_pw testuser@testserver:/ C:\saved_logs\folder_name.txt
My question is if this is the correct approach for solving this issue, and if you guys can point me in the right direction.
Note: I don't need help with finding correct date, just correct approach.
Edit:
So far came with this, google searches didn't help me, I am not sure if I have to first login with pscp and then execute find method or everything needs to be combined:
pscp -P 22 -pw test_pw testuser@testserver find . -type d -regextype sed -regex ".*/20201020-17\.5[0-9]\.[0-5][0-9]_r52d4.*"