Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is there a way to create symbolic link with wildcard

Tags:

bash

symlink

I have a script run.sh to which i created a number of symlinks like pf1, pf2 etc.

I want anything which starts with pf to map to this. Is there a way for me to create a symbolic link with a wildcard like "pf*" so that i don't have to create symbolic links for pf11, pf12 etc in the future?

like image 549
pc70 Avatar asked Sep 19 '25 12:09

pc70


1 Answers

In case bash is supported on your system (which is the case in most systems), you could do something like this -

bash -c "ln -s sourcedir/pf* targetdir/"
like image 138
Jainam MJ Avatar answered Sep 22 '25 09:09

Jainam MJ



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!