修改shell(http://unix.stackexchange.com/questions/46645/how-can-i-use-bash-as-my-login-shell-when-my-sysadmin-refuses-to-let-me-change-i)
.profile
.login(http://unix.stackexchange.com/questions/20629/how-to-change-from-csh-to-bash-as-default-shell)
case $- in
*i*)
# Interactive session. Try switching to bash.
if [ -z "$BASH" ]; then # do nothing if running under bash already
bash=$(command -v bash)
if [ -x "$bash" ]; then
export SHELL="$bash"
exec "$bash"
fi
fi
esac
mount windows,
sudo mount //ip/C$ /media/share -o username=xxx,rw,uid=1000,cache=loose 看mount.cifs的帮助文档,3.7以上的内核要加cache=loose
yum install pptp NetworkManager-pptp -y
matlab 找不到解码器,gstreamer-ffmpeg
linux内容查找find . -name "*.cpp" | xargs grep xxxxxx
查看进程打开的文件lsof -p 12345
查看文件夹大小du -h --max-depth=1 work/testing/logs/
查看磁盘使用情况df -h
find 删除文件
find /home -type f -mtime -2 -exec rm {} \;
find / -name test | xargs rm -rf
查看网卡状态
ethtool eth0/1
ssh无密码登陆,注意哪个是客户端,哪个是服务器。slave是ssh,master是sshd
http://www.cnblogs.com/mophee/archive/2013/04/21/3033859.html
xmllint cdata报错error extra content cdata,因为2.7.3之后限制了文本数据10m,降级成2.7.2就好了。
查看一个文件是什么包提供的
yum whatprovides "*bin/netstat"
安装avast的linux版
linux red hat 6.1系统下部署avast需要先安装依赖包
yum install libcairo.so.2 libexpat.so.0 libexpat.so.1 libfontconfig.so.1 libfreetype.so.6 libpangocairo-1.0.so.0 libpangoft2-1.0.so.0 libpng12.so.0 libgcc.i686
查看io
iotop
iostat -x -k
lsof
avast安装方法:
rpm -ivh avast4workstation-1.3.0-1.i586.rpm
中文输入法
yum install "@Chinese Support"
sudo gedit
xhost +
gnome-terminal 在 KDE 桌面啟動時會自動縮小
http://blog.roodo.com/rocksaying/archives/25394946.html
目前在 KDE 下解決 gome-terminal 縮小的方法是利用 KDE 的「視窗行為」微調。從「系統設定」/「視窗行為」/「視窗規則」(System Settings/Window Behavior/Window Rules)頁面,增加一條規則,其內容如下列:
※ 視窗比對 - 「視窗類別」,「完全符合」: gnome-terminal。
※ 大小與位置 - 勾選「遵循位置限制」,「強制」,「否」。 ("Obey geometry restrictions", "Force", "No")
ntfs sudo yum install ntfs-3g
sudo yum install kdelibs-devel
linux当前网速
sar -n DEV 1 100