Pages

Wednesday, August 24, 2011

bash script to symbolically link using find results

#!/bin/bash

find /var/www/webs -name 'vhost' -exec bash -c 'IFS=/ read -a names <<< "$1"; ln -sf "$1" "${names[4]}"' -- {} \;

No comments:

Post a Comment