2

I tried the following code, but I'm missing something somewhere. I want to create a symbolic link to all *.conf files from /etc/ in /root/links

#!/bin/bash

for conf in /etc/
do
    ln -s "$conf" "/root/links/$conf"
done

1 Answer 1

4

did you mean:

for conf in /etc/*.conf
do
    ln -s "$conf" /root/links/
done

?

1
  • Yes. this is what I was looking for. Aug 17, 2013 at 11:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.