2023年 01月 13日 - Linux下大文件解压

    Linux下大文件解压

    uzip不支持超过4G的文件解压,需要安装7za,7za解压需要处理编码,否则乱码

    yum install -y p7zip
    # 解压命令,-r递归文件夹,-o指定解压目录,无空格
    
    7za x xxx.zip -r -o/tmp/
    
    # 解决乱码
    yum install convmv
    
    # LANG=C表示以US-ASCII这样的编码输出文件名
    LANG=C 7za x xxx.zip
    # 将解压后的文件进行递归转码
    convmv -f GBK -t utf8 --notest -r ./xxx
    
    

    2022年 12月 20日 - PostgreSQL的WITH语句

    多个with

    -- 多个with
    with t1(c1,c2) as (select c1, c2 from table),
    	 t2(c1,c2) as (select c1, c2 from table)
    select * from t1,t2;
    -- 当做变量
    with t1(c1, c2) as (values('a','b'),('a','b')),
    select * from t1;
    

    2022年 12月 20日 - docker常用命令

    docker常用命令

    docker ps [-a]
    docker exec -it ${imageName}|${id} /bin/bash
    docker run -it -d --name ${alias} ${imageName}[:$Tag] -p $serverPort:$dockerServerPort /bin/bash
    docker cp ${id}:/mnt/mydir/ ./localDir
    docker history --format  --no-trunc=true ${id} |sed "s?/bin/sh\ -c\ \#(nop)\ ??g"|sed "s?/bin/sh\ -c?RUN?g" | tac
    

    2022年 12月 16日 - eDEXUI跨终端仿真模拟器

    eDEXUI跨终端仿真模拟器

    https://github.com/GitSquared/edex-ui

    2022年 11月 30日 - psql与pcli的使用

    psql的使用

    最小化安装

    brew install libpq
    
    ln -s /usr/local/Cellar/libpq/xxxxxx/bin/psql /usr/local/bin/psql
    
    psql -h 172.0.0.1 -p 5432 -U postgres -d public