remote ssh commands with wild cards
799875Oct 11 2011 — edited Oct 12 2011I am trying to send a remote command via ssh - need to get a file listing in a directory using a wild card. However, the ssh command will not return results using a wild card:
ssh myusername@remote.server sudo ls -l /var/audit-files/201110* (directory requires root permission)
/var/audit-files/201110*: No such file or directory
I've tried quoting the command, the directory, the file names, etc - same results. It will only work with a specific name that exists, but not with a wild card. Is there a way to make this work?