SpriteWood everybody is one single tree

实用小命令

Friday, November 16th, 2007

创建存档文件tar -czpf folder_name.tar.gz folder_name该命令将 folder_name 创建为 folder_name.tar.gz 存档文件。
递归查找文件内的字符串find ./ -name ‘*.html’ -exec grep “breadcrumbs.inc.php” ‘{}’ \; -print这条命令将查找所有包含 breadcrumbs.inc.php 的 HTML 文件。
搜索并替换文件里的内容sed -i ’s/b/strong/g’ index.html此命令搜索 index.html 文件中的 b 并将其替换为 strong。
查看目录的磁盘占用情况du -h –max-depth=1 | sort -n -r
or du -hs

Tags: , , , ,

Posted in linux | No Comments »> >
  • Categories

  • Recent Posts

  • Recent Comments

  • SpriteWood is proudly powered by WordPress
    Entries (RSS) and Comments (RSS).