linux常用命令

sudo cp -r GMTSAR /usr/local

sudo rm -r GMTSAR /usr/local

tar -xvf gmt-6.2.0-src.tar.gz

unzip ****.zip

gedit +文本文件

source ~/.bashrc

gedit ~/.bashrc

sudo apt-get install gcc

下载软件包 编译安装过程./configure make sudo make install

python ****.py install

conda activate isce2_env

ls -al -af

更新conda版本 conda update -n base -c defaults conda

conda remove --name isce2_env --all

conda create --name isce2_env python=3

conda install --use-local 包名.tar.bz2

conda deactivate

一个文件夹所有文件赋予权限

sudo chmod 777 -R run_files/

------使用touch命令创建空文件

touch a.sh #创建个sh空文件

chmod -R 777 a.sh #给予权限

gedit a.sh #打开文本,进行编辑

创建软连接和查看软连接地址

 ln -s filt_topophase.unw.geo /data/menyuan_DInSAR/ascending/pic/unw

ln -s /data/menyuan_DInSAR/ascending/merged/filt_topophase.unw.geo.xml /data/menyuan_DInSAR/ascending/pic/unw/filt_topophase.unw.geo.xml

#加软连接
 ln  -s 原文件绝对路径 软连接地址 
查看软连接(最后一列)
 ls  -al 
#增加文件执行权限
 chmod  -x 绝对路径 

创建sh和csh脚本

vim text.sh

输入内容

#!/bin/bash   #! /bin/csh -f #! /bin/sh -f

esc shfit :w shift :q

或者文本txt写好,给个权限chmod +x 测试.sh

grep命令

cat
# 将一个文件的内容输出到终端
$ cat file

# 输出文件内容并显示行号
$ cat -n file

# 将文件 file1 和 file2 拼接到一个文件 target_file 中
$ cat file1 file2 > target_file
 cat lj_running_2F_70_70_.txt 
 Total source :  858  
 Fault  1: Num of Cell along strike :   27  
 Fault  1: Num of Cell along dip    :   22  
 Total sources   :  858  
 Smoothing Factor :  50.0  
 Deweight Factor :   0.5  
GOODNESS OF FIT:  InSAR_T111SAR: Sample Numbers & Weight  : 1221  766  50.0  
InSAR:   Weighted Residual Sum of Squares (WRSS), 9197.24
InSAR:   Roughness, Area of Patch, Smooth Factor 0.589242  1 50 
InSAR:   WRSS / (N-P),       20.2137
InSAR:   WRSS / (N),         7.53255
InSAR:   RMSE   ,            0.054891
GOODNESS OF FIT:  InSAR_T231SAR: Sample Numbers & Weight  : 1162  826  50.0  
InSAR:   Weighted Residual Sum of Squares (WRSS), 10040
InSAR:   Roughness, Area of Patch, Smooth Factor 0.589242  1 50 
InSAR:   WRSS / (N-P),       29.8809
InSAR:   WRSS / (N),         8.64027
InSAR:   RMSE   ,            0.0587887
 SAR Mean misfit : ,     0.036 
  SAR Mean misfit : ,     0.039 

 grep -i -n  "WRSS" lj_running_2F_70_70_.txt
8:InSAR:   Weighted Residual Sum of Squares (WRSS), 9197.24
10:InSAR:   WRSS / (N-P),       20.2137
11:InSAR:   WRSS / (N),         7.53255
14:InSAR:   Weighted Residual Sum of Squares (WRSS), 10040
16:InSAR:   WRSS / (N-P),       29.8809
17:InSAR:   WRSS / (N),         8.64027

给文本排序用sort命令

sort -r yuzhen.dat -k 4 -oaftershock.dat
sort yuzhen.dat -k 4 -oaftershock.dat

grep -i -n "Z" totalslip_strike_xy_F1.gmtlin > 2d_Z.dat 
sort -r 2d_Z.dat -k 2 -o2d_z.dat

grep -i -n "Z" lj_slip_3dgrid.gmtline > 3d_Z.dat
sort -r 3d_Z.dat -k 2 -o3d_z.dat
gmt project -C101.888/29.6327 -E102.190/29.7245 -G0.5 -Q > track1.dat
gmt grdtrack track1.dat -Gasc_los_cut.grd  | awk '{print $3,$4}' > asc_AA1.dat
 gmt grdtrack track1.dat -Gmenyuan_dem.grd  | awk '{print $3,$4}' >topo_AA1.dat
 grdtrack track1.dat  -Gdes_los_cut.grd  | awk '{print $3,$4}' > des_AA1.dat


gmt project -C102.031/29.2619 -E102.333/29.3537 -G0.5 -Q > track2.dat
gmt grdtrack track2.dat -Gasc_los_cut.grd  | awk '{print $3,$4}' > asc_BB1.dat
 gmt grdtrack track2.dat -Gdes_los_cut.grd  | awk '{print $3,$4}' > des_BB1.dat
gmt grdtrack track2.dat -Gmenyuan_dem.grd  | awk '{print $3,$4}' > topo_BB1.dat

 gdal_translate -of GSBG 20230129_20230210.rng.geo.png.masked.tif 1.grd
gmt project los_parallel.xyz -C100.72/37.24 -E101.54/38.35  -W0/0.3 -Frspq -Q >insar2.dat
gmt project los_parallel.xyz -C100.72/37.24 -E101.54/38.35  -W0/0.3 -Frsp -Q >insar3.dat
 grdtrack insar3.dat -Glos_parallel.grd > 1.dat
awk '{if($2>36 &&$1<38.5 && $2>35.5 && $2<38.5) print $2,$1,$4}' $insar_file > insar_north.dat
makecpt -Crainbow -T5/20/2 -Z >north.cpt
psxy insar_north.dat -R -J -Sc0.02i -Cnorth.cpt -K -O >>${psfile}
#
rar x hs-04.rar
rar a etc.rar /etc



https://blog.csdn.net/lyfwx/article/details/119252984

https://jingyan.baidu.com/article/8cdccae984327d705513cd0b.html

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值