Trying to script a file download in Ubuntu from an SMB network server (windows-esque).
I have a folder tree as follows:
- file1.tar.gz
- file2.tar.gz
- file3.tar.gz
These files have different modified dates.
I want to download the latest file using smbclient, get
requires a file name which I won't know what the latest file name is (it won't necessarily be in numeric order).
How do I get the last created file using smbclient? Is there a specific mask in mget
to do this?
I also hopefully want to do this without any interaction from the user (part of a shell script).