一些linux命令

来源:互联网 发布:酷家乐墙面设计软件 编辑:程序博客网 时间:2024/06/07 17:29
启动memcached
/usr/memcached-1.4.5/bin/memcached -d -m 10 -u root -l 121.15.56.15 -p 9000 &


启动samba
service smb restart


查看端口
lsof -i:80


远程复制
scp -r /usr//tomcat-xxx root@121.15.56.15:/usr/


chkconfig iptables --list
iptables -L


查看防火墙是否开启
service iptables status


查看网络连接
netstat -t


查看内存
free -m


查看服务器状态(运行时间,负载,用户数)
uptime


查看服务器状态(运行时间,负载,用户数,cpu,内存等等)
top


查看硬件信息
dmidecode


查看目录下的文件及文件夹大小
du -h -max-depth=1 /usr/


查看磁盘空间
df -m


查看删除的进程
lsof | grep 'delete' 


查找/usr目录下大于100M的文件
find /usr -type f -size +100000k


设置服务器时间
date -s '2012-02-12 15:20'


查看linux版本发行信息
lsb_release -a


每月的1号执行
crontab 0 0 1 * * /usr/apps/xx_month.sh
crontab 表达式 分 时 日 月 周
crontab -e 编辑crontab
原创粉丝点击