mount local the ip off the server that disappeared: ifconfig eth0:fakenfs 192.168.0.18 netmask 255.255.255.255 umount -f -l /my/mount/dir ifconfig eth0:fakenfs down
netstat -ltnup
This script copies files from one location to another building the same directory structure.
#!/bin/bash TARGETDIR=/usr/local/vmware/custom/host1 copyfiletotarget() { dir=${1%/*} #echo $TARGETDIR$dir mkdir -p $TARGETDIR$dir cp -pR $1 $TARGETDIR$1 } copyfiletotarget /etc/make.conf copyfiletotarget /etc/ha.d/haresources copyfiletotarget /etc/ha.d/authkeys copyfiletotarget /etc/ha.d/ha.cf copyfiletotarget /etc/ha.d/ha_logd.cf copyfiletotarget /var/www/localhost/htdocs/index.htm copyfiletotarget /var/www/localhost/htdocs/index.txt copyfiletotarget /etc/conf.d/hostname copyfiletotarget /etc/hosts copyfiletotarget /etc/iscsi copyfiletotarget /etc/conf.d/net copyfiletotarget /etc/conf.d/ntp-client copyfiletotarget /etc/nut/ copyfiletotarget /etc/samba/smb.conf copyfiletotarget /usr/local/sbin copyfiletotarget /etc/vmware/netmap.conf copyfiletotarget /etc/vmware/config copyfiletotarget /etc/vmware/license.vs.1.0-00 copyfiletotarget /etc/vmware/license.cfg copyfiletotarget /etc/vmware/hostd/vmInventory.xml copyfiletotarget /etc/vmware/hostd/datastores.xml
for f in ?.jpg; do mv "$f" "000$f"; done for f in ??.jpg; do mv "$f" "00$f"; done for f in ???.jpg; do mv "$f" "0$f"; done
for f in net-acct-*; do gzip "$f"; done
for f in *.zip; do a=`/bin/basename $f .zip`; mkdir $a; cd $a; unzip ../$f; cd ../; done
find . -exec touch {} \;
find ~/somedir/ | grep .mkv | xargs -i cp -v {} /usr/local/media/movies/
grep -vE '^\s*(#|$)' $1 | grep -v -e '^$'