标签:list ffffff through rom 匹配 汇总 orm tar.bz2 cto
一、打包压缩解压
①压缩
tar -czvf Test.tar.gz ./Test
tar -cjvf Test.tar.bz2 ./Test
②解压
tar -xzvf Test.tar.gz
tar -xjvf Test.tar.bz2
-c, --create: create a new archive
-z, --gzip: filter the archive through gzip
-v, --verbose: verbosely list files processed
-f, --fIle=ARCHIVE: use archive file or defice ARCHIVE
-x, --extract, --get: extract files from an archive
二、查找替换
①. 查找指定目录下某一文件
find ./ -name filename
②. 查找指定目录下文件中的字符串
grep -r --color "Str" ./
③. 替换指定目录下文件中的字符串
grep -rl printf ./ | xargs sed -i ‘s/printf/xxxxxx/g‘ --printf -->> xxxxxx
④. 严格匹配替换指定目录下文件中的字符串
grep -rl "printf" ./ | xargs sed -i ‘s/\<printf\>/xxxxxx/g‘
grep 选项介绍
-r, -R, --recursive: Read all files under each directory, recursively
-l: Suppress normal output; instead print the name of each input file from which output would normally have been printed.
标签:list ffffff through rom 匹配 汇总 orm tar.bz2 cto
原文地址:https://www.cnblogs.com/wulei0630/p/9226657.html