Linux指令
1.查找指定文件中的字符
find -type f -name '*.java'|xargs grep 'carlife_show'
2.编写脚本.sh文件
(1)创建文本,第一行独占一行填写
#!/bin/sh
(2)从第二行开始写入要执行的命令,如:adb执行脚本
adb remount
adb push /work/code/out/target/product/sabresd_6dq/system/app/CarLifeClient/CarLifeClient.apk system/app/CarLifeClient/
adb push /work/code/out/target/product/sabresd_6dq/system/app/CarLifeService/CarLifeService.apk system/app/CarLifeService/
adb reboot
(3)进入脚本文件对应路径下,打开中端,给脚本运行权限,输入
chmod +x Carlife_install.sh
(4)执行脚本,只需在终端中输入
./Carlife_install
3.打开指定文件
sudo gedit 文件(hosts)
vi ~/.ssh/id_rsa.pub
4.压缩文件
tar -cvf 文件压缩名 文件名
5.解压文件
tar -xzvf 文件压缩名