daily used command[just for remember]

[b]1. change user : SU[/b]
eg: if current user is root, u want to change to another user A, then : su userA


1. just list directory:

ls -l| grep ^d

2. list specific character directory
ls -d abc*

3. list directory via time
ls -l -t
ls -lrt

4. check whether a port number is used:
netstat -n | grep 15010

if generate nothing, then not used; if generated including the port number lines, then its occupied

5 search specific strings from a bunch of file
grep -n -R "string" ./*
在屏幕当前目录下所有打印出包含string字符串的文件名及行数;
-n 打印行数,
-R 遍历目录
./* 当前目录下所有文件

6 copy a file to current directory
cp xyz .

7 add symbolic link

symbolic link: http://en.wikipedia.org/wiki/Symbolic_link
ln -s <SOURCE FILE> <DESINATION FILE>
ln -s /sbcimp/run/pkgs/APRAP/profiles/.aprap_second_functional_run_profile /home/dssengap/.aprap_prod_run_profile
remove symbolic link: rm linkname
8 kill service
kill -9 pid

9. memory used checked:
http://www.cyberciti.biz/faq/linux-check-memory-usage/
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值