Note: This is not a duplicate of 2597394.
I have an FTP server (Unix or Linux) with a folder that contains the following files (for example):
- filename.txt
- filename.txt.abc
- filename
When I issue mget file*
command to ftp
or sftp
, I can fetch all three files. What I need to do is to fetch only the filename file (the one without any extension).
I tried grep
and |
but these aren't recognized by the ftp
or sftp
commands' prompt. I also tried --exclude
but the mget here doesn't even support any options. The man page is something like this.
How do I solve this problem? I cannot specify the exact filename as it's not known. It must be a wild card.