工作 常用 linux

 

cd
ls -al
ll
mkdir -p 
chmod -R 777 /home/aoi
cp -r /home/aoi ./
df -h   
sudo du -s * | sort -nr | head
sudo du --max-depth=1
find . -type f -name "*.txt" -exec cat {} \; > all.txt 
find ./14* -type f -name "*.txt" -exec more {} \;
scp /home/aoi/ [email protected]:/home/aoi/
ln -s self_help/aoglogs  statlog
lsof -p 23661 | awk '{sum+=$7} END {print "Sum = ", sum}'  // 统计某个进程占用空间
jps | grep MainEnter | grep -v grep | cut -c 1-4 | xargs kill -s 9
!1055 // 启动历史命令
ftp 常用命令
ftp 192.168.18.116
get aaa.war 



mysql常用命令
history | grep mysql
mysql -uroot -phappytimmy -h192.168.16.11
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;  
flush privileges;
update province set lct_code= 10000+app_code  where 1=1; 
update  province a inner join  province b  on a.code= b.code    set a.name = concat(b.name,'省');
update  city a inner join  city b  on a.cityid= b.cityid    set a.city_name = concat(b.city_name,'市');
insert into sys_config (config_name,config_value,config_desc) values('cmcc.aoi.self.wkjs.downloadmultiplehtml.url','FusionAbility/selfhelp','');
select   distinct(COALESCE(user_id,-1))     userId   from  t_friendship  where  user_src ='1401155710'  and user_id > 0

redis常用命令
redis-server redis.conf
redis-cli
keys *
flushdb
set name "baoyou"/ get name /del name /exits name
lrange "JSON_LIST_2016060610_3" 0 1

 

 

 

 

 

 

 

 

 

 

 

 

 

你可能感兴趣的:(工作,linux,常用)