if [ $(date +%e) -eq $(cal|xargs|awk '{print $NF}') ]; then
echo "last day"
else
echo "not last day"
fi
if [ "$(date +%m)" != "$(date +%m -d "+1day")" ]; then
echo "last day"
else
echo "not last day"
fi
if [ "01" = "$(date +%d -d "+1day")" ]; then
echo "last day"
else
echo "not last day"
fi
# mount -f 192.168.100.71:/d /mnt
mount: 1831-008 giving up on:
192.168.100.71:/d
showmount --exports nas-server-IP
这个命令可以显示服务器上共享了那些目录。
然后再用mount命令就可以了
mount nas-server-IP:share-dir your-local-dir
把刚加入服务行列的NAS给加上Linux Server主机:
mkdir /mnt/test
mount -t cifs //{ip address}/{share} -o username={username},password={password} /mnt/test/
mount函数挂载nfs: mount -t nfs -o nolock 192.168.0.100:/gdtest /mnt
注解:本示范是用/mnt/test/ 为 mount point,取消用 umount /mnt/test/
后记:编码可加上iocharset=utf8这种写法
如果将NAS mount到linux上了,但重启后就没有了, 就可以
write the command to /etc/rc.d/rc.local