Operating System - HP-UX
1847851 Members
2178 Online
104021 Solutions
New Discussion

No wildcard expansions found

 
Sunitha Chandramohan
Occasional Advisor

No wildcard expansions found

Hi,

I am using the scp command to get some files from a remote server

scp user1@db1:path/Z*.lst .

where path is not my home directory and when I try it is giving me

warning: No wildcard expansions found for '/prod/dbload/Z*.lst'.

Any help/work around on this is highly appreciated.

Thanks,
Sunitha.
29 REPLIES 29
Rodney Hills
Honored Contributor

Re: No wildcard expansions found

You should put the path in quotes. example-

scp "user1@db1:path/Z*.ls" .

The way you have it, the local shell is doing the wildcard expansion.

HTH

-- Rod Hills
There be dragons...
Sridhar Bhaskarla
Honored Contributor

Re: No wildcard expansions found

Hi Sunitha,

I am not getting the same behaviour with my 3.8.1p1 client. I would try escaping the wild character or putting it in quotes. For ex.,

scp "user1@db1:/prod/dblocal/Z*.lst" or
scp user1@db1:/prod/dblocal/Z\*.lst

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sunitha Chandramohan
Occasional Advisor

Re: No wildcard expansions found


Thanks for your responses.

I did try using quotes and it is giving me this warning message now.

scp "user1@db1:path/Z\*.lst" .

warning: Cannot open source file db1:path/Z\*.lst
Prashant Zanwar_4
Respected Contributor

Re: No wildcard expansions found

Dont use quotes and \ together. Either of them will do it for you.

Thanks
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Sunitha Chandramohan
Occasional Advisor

Re: No wildcard expansions found


I am still getting the same warning message no wildcard expansions found.

Thanks,
Sunitha.
Sridhar Bhaskarla
Honored Contributor

Re: No wildcard expansions found

Hi Sunitha,

What version of ssh are you using?. I would try with HP's from software.hp.com.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sunitha Chandramohan
Occasional Advisor

Re: No wildcard expansions found


Thanks everyone for your time and help.

Sri it's
SSH Version 2.0.12.

Thanks,
Sunitha.
Prashant Zanwar_4
Respected Contributor

Re: No wildcard expansions found

Something wrong you are doing in my openion as message should be different otherwise..

..
Thanks
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Sunitha Chandramohan
Occasional Advisor

Re: No wildcard expansions found


May be. But the same command was working properly few weeks.

I was wondering if this was a bug.

Thanks,
Sunitha.
Bharat Katkar
Honored Contributor

Re: No wildcard expansions found

Hi sunitha,
This should work.
# scp "user1@db1:/..../Z*.lst"

Regards,
You need to know a lot to actually know how little you know
Prashant Zanwar_4
Respected Contributor

Re: No wildcard expansions found

Might be it is not a good advice..just try changing to k-shell once.

Thanks
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Prashant Zanwar_4
Respected Contributor

Re: No wildcard expansions found

Try copying in debugging mode using -v option and send the output here.

scp -v "user@hostname://Z*.lst"

Thanks
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Sunitha Chandramohan
Occasional Advisor

Re: No wildcard expansions found


thanks everyone.

Prashant,

scp -v user1@db1:path/Z*.lst .

warning: Development-time debugging not compiled in.
warning: To enable, configure with --enable-debug and recompile.
Development-time debugging not compiled in.
To enable, configure with --enable-debug and recompile.
debug: connecting to db1...
debug: entering event loop
debug: ssh_client_wrap: creating transport protocol
debug: ssh_client_wrap: creating userauth protocol
debug: Host key found from the database.
debug: Ssh2AuthPubKeyClient/authc-pubkey.c:226: ssh_client_auth_pubkey_send_signature
debug: Ssh2AuthPubKeyClient/authc-pubkey.c:262: ssh_client_auth_pubkey_send_signature: reading path/.ssh2/id_dsa_1024_a
debug: Ssh2/ssh2.c:306: client_authenticated
debug: DISPLAY not set; X11 forwarding disabled.
warning: No wildcard expansions found for '/prod/dbload/Z*.lst'.

Thanks,
Sunitha.
RAC_1
Honored Contributor

Re: No wildcard expansions found

How about --
scp "user1@db1:path/Z[a-zA-Z]*.lst" .

Anil
There is no substitute to HARDWORK
RAC_1
Honored Contributor

Re: No wildcard expansions found

Or better --
scp user1@db1:path/Z[a-zA-Z]*.lst .

Anil
There is no substitute to HARDWORK
Sunitha Chandramohan
Occasional Advisor

Re: No wildcard expansions found


Thanks for your response Anil. But I am getting the same error.

scp user1@db1:path/Z[a-zA-Z]*.lst .
warning: No wildcard expansions found for 'path/Z[a-zA-Z]*.lst'.
Sridhar Bhaskarla
Honored Contributor

Re: No wildcard expansions found

Hi,

Did you upgrade/reinstall ssh recently?. I don't see any reason why it worked before and not anymore without any changes.

It looks like a commercial version. I believe it's the ssh's inability to deal with wildcards. If so, you will need to work with the vendor. I use my own compiled version of 3.8.1p1 from openssh.org and it can work with wild-chars just fine.

You can try HP's openssh if yours are HP systems and it may impact your ssh setup.

http://software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=T1471AA


-Sri
You may be disappointed if you fail, but you are doomed if you don't try
RAC_1
Honored Contributor

Re: No wildcard expansions found

You must have checked this. But are there any file as /path/Z*.lst in that dir??

Anil
There is no substitute to HARDWORK
Prashant Zanwar_4
Respected Contributor

Re: No wildcard expansions found

What happen if you just mention one of the file name with path to it. Does it get copied..
How many files are there and how big..

Thanks
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
RAC_1
Honored Contributor

Re: No wildcard expansions found

echo "`cp user1@db1:path/Z*.lst .`"

What does above return???

Anil
There is no substitute to HARDWORK
Sunitha Chandramohan
Occasional Advisor

Re: No wildcard expansions found


Thanks everyone for your time and quick responses. thank you so much.

Anil,

I have checked that the files exist under the specific path and also I have the necessary permissions. Thanks for checking on this.

Prashant,

I did try coping just one file and that was successful. I have more than 100 files. Some of them are very small in Kb and some of the files may be 10 of them are around a Meg. Also when I copying from my home directory wild card works fine.

Example : scp user1@db1:$HOME/* . -- Works Fine

Really appreciate your time and help on this.

Thanks,
Sunitha.
Sunitha Chandramohan
Occasional Advisor

Re: No wildcard expansions found


Anil,

Unfortunately I am getting the following message when I try

echo "`cp user1@db1:path/Z*.lst .`"
cp: cannot access user1@db1:path/Z*.lst: No such file or directory

Thanks,
Sunitha.
RAC_1
Honored Contributor

Re: No wildcard expansions found

Correction in my last post.

echo "`scp user1@db1:path/Z*.lst .`"

I did cp, which should have been scp.

Anil
There is no substitute to HARDWORK
Prashant Zanwar_4
Respected Contributor

Re: No wildcard expansions found

Can you try sftp instead.

sftp user@server:/path/
mget Z*.lst

Just a try if it gives an error. and if it works..then also u r done.

Thanks
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."