回显:
echo amlinsan
查找文件:
find . -name property_service.c
查找文件(忽略大小写):
find . -iname property_service.c
限定目录深度查找文件:
find . -mindepth 5 \( -iname IServiceStateExt.aidl -o -iname ServiceStateExt.aidl \) -print
打开文本文件:
gedit file
用默认程序打开文件或文件夹:
xdg-open ./
搜索字串:
grep your_string ./ -inr
替换文本字符:将“MTK_GPS_SUPPORT”=换成“MTK_GPS_SUPPORT = ”
sed -i "s/MTK_GPS_SUPPORT=/MTK_GPS_SUPPORT = /g" *.mak
重命名文件:把目录下所有文件命中的空格换成下划线
rename 's/ /_/g' *
对应windows下的pl脚本:
system"rename *.pbm *.bmp"
重命名:
mv gcc-4.4 gcc
删除文件,如批量删除CVS:
find . -name 'CVS' | xargs rm -r
批量push apk:
ls | xargs -I {} adb push {} system/app
多.gz一起解压:
tar -zvxf ALPS.GB.FDD2.MP.V3.9_BIRD73_GB_GPL.tar.gz
cat ALPS.GB.FDD2.MP.V3.9_BIRD73_GB_INHOUSE.tar.gz0* | tar zvxf -
其中,源文件的路径要针对即将创建的软连接文件提供。
检查有没有重复行:
sort mediatek/build/tools/javaoption.pm | uniq -d
压缩与解压缩:
zip -r output.zip folderxxx filexxx
unzip output.zip
rar a output.rar folderxxx filexxx
rar x output.rar
获得可执行权限:
chmod 777 * -R
去掉写权限:
echo amlinsan
查找文件:
find . -name property_service.c
查找文件(忽略大小写):
find . -iname property_service.c
限定目录深度查找文件:
find . -mindepth 5 \( -iname IServiceStateExt.aidl -o -iname ServiceStateExt.aidl \) -print
打开文本文件:
gedit file
用默认程序打开文件或文件夹:
xdg-open ./
搜索字串:
grep your_string ./ -inr
替换文本字符:将“MTK_GPS_SUPPORT”=换成“MTK_GPS_SUPPORT = ”
sed -i "s/MTK_GPS_SUPPORT=/MTK_GPS_SUPPORT = /g" *.mak
重命名文件:把目录下所有文件命中的空格换成下划线
rename 's/ /_/g' *
对应windows下的pl脚本:
system"rename *.pbm *.bmp"
重命名:
mv gcc-4.4 gcc
删除文件,如批量删除CVS:
find . -name 'CVS' | xargs rm -r
批量push apk:
ls | xargs -I {} adb push {} system/app
多.gz一起解压:
tar -zvxf ALPS.GB.FDD2.MP.V3.9_BIRD73_GB_GPL.tar.gz
cat ALPS.GB.FDD2.MP.V3.9_BIRD73_GB_INHOUSE.tar.gz0* | tar zvxf -
分段压缩:
tar cjf - .git/ | split -d -b 4000m - BD6753_35GC_C_L1_ALPS.L1.MP3.V2_20151012.tar.bz2.
ln -s 源文件 软连接文件
其中,源文件的路径要针对即将创建的软连接文件提供。
检查有没有重复行:
sort mediatek/build/tools/javaoption.pm | uniq -d
压缩与解压缩:
zip -r output.zip folderxxx filexxx
unzip output.zip
rar a output.rar folderxxx filexxx
rar x output.rar
获得可执行权限:
chmod 777 * -R
去掉写权限:
chmod o-w /usr