1 2 3 4 5 6 7 8 9 10 11
#!/bin/sh # replace /var/* symlinks with actual directories find $TARGET_DIR/var/ -type l | while read path do [ -d "$path" ] || continue rm -v $path mkdir -v $path done