命令 | 说明 | |
ps -ef | 查看进程进程例如 ps -ef|grep java | |
tar | 压缩(cvf),解压(xvf)命令;tar -cvf test.tar test; | |
sz | 下载(secureCrt) | |
rz | 界面化上传 | |
put | SFTP 上传文件 | |
get | SFTP 获取文件 | |
ls/ll | 查看文件列表:ls -l | |
mv | 移动(重命名) 例如: mv test ../ | |
cp | 拷贝 | |
mkdir | 创建文件夹 | |
rm | 删除 rm -rf xxx 循环删除 | |
rmdir | 删除为空的文件夹,如果不为空,则不能删除 | |
lsb_release -a | 查看服务器版本 | |
tail | tail -f System.out | |
ps ax | 查看所有进程 | |
vi | 文件查看与编辑 :q; :wq; | |
cat /proc/meminfo | 查看linux的硬件信息:内存 参考结果如下: [meeting@localhost ~]$ cat /proc/meminfo|more MemTotal: 8173976 kB MemFree: 92680 kB Buffers: 148812 kB Cached: 6773032 kB SwapCached: 0 kB Active: 3142592 kB Inactive: 4728296 kB HighTotal: 0 kB HighFree: 0 kB LowTotal: 8173976 kB LowFree: 92680 kB SwapTotal: 6094840 kB SwapFree: 6094696 kB Dirty: 60 kB Writeback: 0 kB AnonPages: 949292 kB Mapped: 70992 kB Slab: 166112 kB PageTables: 11532 kB NFS_Unstable: 0 kB Bounce: 0 kB CommitLimit: 10181828 kB Committed_AS: 2270564 kB VmallocTotal: 34359738367 kB VmallocUsed: 265924 kB VmallocChunk: 34359472395 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 Hugepagesize: 2048 kB | |
cat /proc/cpuinfo | 查看linux的硬件信息:CPU | |
ssh | ||
wget | wget www.163.com [root@AHGY-Stream1 ~]# wget www.163.com --2012-04-12 09:35:46-- http://www.163.com/ Resolving www.163.com... 58.222.24.238 Connecting to www.163.com|58.222.24.238|:80... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] Saving to: `index.html.5' ] 357,162 598K/s in 0.6s 2012-04-12 09:35:46 (598 KB/s) - `index.html.5' saved [357162] | |
ifconfig | 获取ip地址信息 eg:ifconfig -a eg:[root@AHGY-Stream1 ~]# ifconfig -a eth0 Link encap:Ethernet HWaddr 5C:F3:FC:7A:CC:98 inet addr:192.168.5.74 Bcast:192.168.5.255 Mask:255.255.255.0 inet6 addr: fe80::5ef3:fcff:fe7a:cc98/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1160511263 errors:0 dropped:0 overruns:0 frame:0 TX packets:897237817 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:828082450640 (771.2 GiB) TX bytes:141313605366 (131.6 GiB) Interrupt:193 Memory:92000000-92012800 | |
man | 查看说明文档 例如:man ps | |
uname | 查看系统版本:Linux/SunOs | |
pwd | ||
grep | 按照一定的规则来进行文件内的查找。下面语句是把查找的内容合并成一个文件 eg:grep 'com.wondertek.meeting.dao.impl.GroupPlanDetailDaoImpl' /wd/logs/meeting_catalina_out.log>my_grep_logs20120416.log |