菜单

关闭
  • Home
  • Java
  • Clojure
  • Python
  • Linux
订阅
菜单

Linux

共 52 篇文章

第 1 页 ⁄ 共 6 页 下一页 →

shell,使用find批量删除时指定文件个数

find . >list | tail -10000 list | xargs rm -rf {} | xargs rm -rf find . -name "*" -exec rm {} \; -print |head -10000 »

Grizzly 标签:Linux, Shell Tips 2016年02月04日

shell,查看cpu及内存占用

top -b -n 1 |grep nginx|awk '{print "cpu:"$9"%","mem:"$10"%"}' »

Grizzly 标签:Linux, Shell Tips 2016年02月04日

shell,使用touch或find对目录的Modify时间修改

touch -c -m -t 201602010000 /etl/home/gbuser/test/ find . -exec touch -c -m -t 201602010000 {} \; »

Grizzly 标签:Linux, Shell Tips 2016年02月04日

shell,find查找时排除子目录

find . -path "./*/*" -prune -o -type f -size -10000000c -print| xargs ls -crt -ld | head -1000 »

Grizzly 标签:Shell Tips, Linux 2016年02月04日

install MariaDB on debian 8

sudo apt-get install software-properties-common sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db sudo ad »

Grizzly 标签:Linux, MySQL 2016年02月04日

shell,使用sed对文件截取

截取第1行到第200行 sed -n '1,200p' file >>newfile sed -i '1,200d' file »

Grizzly 标签:Linux, Shell Tips 2016年02月04日

shell,使用find只列出文件名

find . -name "*.c" -exec basename {} \; »

Grizzly 标签:Linux, Shell Tips 2016年02月04日

Shell,使用ls,export查找n天前的文件

ls export$(date -d'15 days ago' "+%Y%m%d")*.pn.gz »

Grizzly 标签:Linux, Shell Tips 2016年02月04日

Shell,使用cat,sed或awk删除空行

使用cat cat filename|tr -s '\n' 使用sed sed '/^$/d' filename sed -e '/^\n$/d' file.txt sed '/^ *$/d' list.txt >newlist.txt 使用awk aw »

Grizzly 标签:Linux, Shell Tips 2016年02月04日

Linux,在debian/ubuntu 中apt-get及wget使用代理

apt-get添加代理 vim /etc/apt/apt.conf Acquire::http::proxy "http://username:password@proxy_adress:port_number"; #export http_proxy=http://us »

Grizzly 标签:Linux, Shell Tips 2016年02月04日
第 1 页 ⁄ 共 6 页 下一页 →
C'est la vie © 2016
Proudly published with Ghost & GhostChina