find . ( -name ".txt" -o -name ".pdf" ) -print
cd - 跳转到上次的目录
ln -s /usr/local/bin/xxx /usr/bin/xxxx
scp file username@ip:path 将本地的目录传给服务器(类unix) scp -r directory username@ip:path
iftop -n
[利用mount命令将另外一个linux服务器上的目录挂在到本机] 被挂载机(文件服务器):192.168.1.100 挂载到机(实际上传文件机):192.168.1.200 主要是利用NFS服务来完成: 你先要在192.168.1.100上开启NFS服务并编辑/etc/exports文件: chkconfig --level 35 nfs on ;开启NFS启机运行 service nfs start ;手动启动服务 vi /etc/exports, 加入: /fileserver 192.168.1.200 (rw,sync,no_root_squash) ;编辑需要共享的目录和允许访问的服务器及权限。 还如: /opt/apache-tomcat-6.0.37/webapps/fileShare/file * (rw,sync,no_root_squash) /mnt * (ro,sync) 然后到192.168.1.200 mkdir /fileserver chmod 777 -R /fileserver mount 192.168.1.100: /fileserver /fileserver
crontab -e crontab -l
crontab日期格式
这个星期是错的 应该是0-6 0是周日 6是周六 点这个看教程
定时任务 打包备份log并以日期.tar命名 (ubuntu的坑 普通用户用 sudo crontab -e 打开 才执行)
0 2 * * * cd /var/log && sudo tar -cvf 20date +%y-%m-%d
.tar dpkg.log mysql.log fontconfig.log &&sudo mv /var/log/20date +%y-%m-%d.tar
/home/shiyanlou/backup
uptime
倒数第三个是是一分钟的负载率,负载率是否过高和cpu数量有关