Currently browsing tag

Linux, Page 17

.htpasswd notes

[root@SERVER ~]$ htpasswd Usage: htpasswd [-cmdpsD] passwordfile username htpasswd -b[cmdpsD] passwordfile username password htpasswd -n[mdps] username htpasswd -nb[mdps] username password -c Create …

gnuplot notes

gnuplot> set xlabel “Matrix size” // Add a label for the X Axis gnuplot> set ylabel “MFlops” // Add a label for …

檢查 licenses 使用狀態

[root@LMSERVER ~]# lmstat -a —————————————————————— lmstat – Copyright (c) 1989-2006 Macrovision Europe Ltd. and/or Macrovision Corporation. All Rights Reserved. Flexible License Manager …

wget overwrite file

用wget指令. 複寫某個檔案 wget http://www.samtseng.co.cc/known_hosts -O ~/.ssh/known_hosts

終於讓我找到好用的工具 DenyHosts

之前為了阻斷無聊的駭客對我的機器猜密碼. 寫了一隻回報 script. 放在 cron裡面每天回報 [root@samtseng ~]# crontab -e 0 0 * * * /etc/failedssh [root@samtseng ~]# cat /etc/failedssh #/bin/bash grep “Failed …

MPICH and gfortran

From : http://chengavin.blogspot.com/2008/10/mpich-and-gfortran.html export FC=”gfortran -O2 -ff2c -fno-underscoring ” export F77_GETARGDECL=” ” export CC=”gcc -O2 ” export CXX=”g++ -O2 ” export F90=”gfortran …

DNS master / slave 架設

master 的 /etc/named.conf : zone “samtseng.co.cc” { type master; file “samtseng.co.cc.zone”; allow-transfer { xxx.xxx.xxx.xxx; // slave dns ip address }; }; zone …

如何用 bash 與使用者互動?

#!/bin/bash echo -n “Enter your name > ” read txtname echo “Hi! $txtname” 上面的 shell script 會接收使用者的輸入. 然後在印出 Hi! 使用者. 如果想要寫個 script …