I had to copy /bin from one server to another because i accidently removed /bin ... now all copied and working but some of the soft links seems to have been created as file and their permissions set to 777 by default.. how can i recopy those ones? or change their permission to be same as the source server?
see below
source server:
lrwxrwxrwx 1 root root 4 Sep 27 11:47 sh -> bash
lrwxrwxrwx 1 root root 4 Sep 27 11:47 awk -> gawk
lrwxrwxrwx 1 root root 2 Sep 27 11:47 red -> ed
lrwxrwxrwx 1 root root 4 Sep 27 11:48 fgrep -> grep
lrwxrwxrwx 1 root root 4 Sep 27 11:48 egrep -> grep
lrwxrwxrwx 1 root root 10 Sep 27 11:48 tracert -> traceroute
lrwxrwxrwx 1 root root 10 Sep 27 11:48 traceroute6 -> traceroute
lrwxrwxrwx 1 root root 10 Sep 27 11:48 tcptraceroute -> traceroute
lrwxrwxrwx 1 root root 3 Sep 27 11:48 gtar -> tar
lrwxrwxrwx 1 root root 8 Sep 27 11:48 ypdomainname -> hostname
lrwxrwxrwx 1 root root 8 Sep 27 11:48 nisdomainname -> hostname
lrwxrwxrwx 1 root root 8 Sep 27 11:48 domainname -> hostname
lrwxrwxrwx 1 root root 8 Sep 27 11:48 dnsdomainname -> hostname
lrwxrwxrwx 1 root root 2 Sep 27 11:48 view -> vi
lrwxrwxrwx 1 root root 2 Sep 27 11:48 rview -> vi
lrwxrwxrwx 1 root root 2 Sep 27 11:48 rvi -> vi
lrwxrwxrwx 1 root root 2 Sep 27 11:48 ex -> vi
lrwxrwxrwx 1 root root 4 Sep 27 11:49 csh -> tcsh
lrwxrwxrwx 1 root root 21 Sep 27 11:50 ksh -> /etc/alternatives/ksh
lrwxrwxrwx 1 root root 4 Sep 27 11:51 mailx -> mail
[oracle@node01 bin]$ ls -ltr | grep vi
-rwxr-xr-x 1 root root 632912 Jun 12 2009 vi
lrwxrwxrwx 1 root root 2 Sep 27 11:48 view -> vi
lrwxrwxrwx 1 root root 2 Sep 27 11:48 rview -> vi
lrwxrwxrwx 1 root root 2 Sep 27 11:48 rvi -> vi
lrwxrwxrwx 1 root root 2 Sep 27 11:48 ex -> vi
target server:
[oracle@node02 bin]$ ls -ltr | grep vi
-rwxrwxrwx 1 root root 632912 Oct 5 11:52 rview
-rwxrwxrwx 1 root root 632912 Oct 5 11:52 view
-rwxr-xr-x 1 root root 632912 Oct 5 11:52 vi
-rwxrwxrwx 1 root root 632912 Oct 5 11:52 rvi
[oracle@node02 bin]$ ls -ltr | grep mail
-rwxr-xr-x 1 root root 84856 Oct 5 11:52 mail
-rwxrwxrwx 1 root root 84856 Oct 5 11:52 mailx
[oracle@node02 bin]$