How do I symlink all files from one directory to another in bash? [closed]

ln -s /mnt/usr/lib/* /usr/lib/

I guess, this belongs to superuser, though.


GNU cp has an option to create symlinks instead of copying.

cp -rs /mnt/usr/lib /usr/

Note this is a GNU extension not found in POSIX cp.


ln -s /mnt/usr/lib/* /usr/lib/