linux重要指令速查表

查看内存泄漏

valgrind --leak-check=full --show-leak-kinds=all myprog arg1 arg2

创建容器且挂载host目录到容器:

docker run --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -it -v /Users/rigensen/workspace/:/home ubuntu:16.04-work env LANG=C.UTF-8 /bin/bash
docker exec -it 8af57f6c14da /bin/bash

du看文件大小排序

du -s * | sort -nr 

mosquitto订阅日志

 nohup mosquitto_sub -h emqx.qnservice.com -p 1883 -t aj-100-log >> aj-100-log &

命令行执行结果送入剪切板

echo 'Hello World!' | pbcopy

ffprobe

ffprobe -v debug output.flv
ffprobe -v trace output.flv
-show_frames
ffmpeg -i video.h264 -c:v copy copy2.flv
ffmpeg -i video.h264 -c:v libx264 -f h264 reencode-x264.h264

hexdump

hexdump -v -e '16/1 "0x%02X " "\n"' pic.jpg

保存原始rtmp流为flv不转码

rtmp://192.168.1.11:1935/live/teststream -acodec copy -vcodec copy -f flv -y test.flv
ffmpeg -i rtmp://server/live/streamName -c copy dump.flv  

mqtt保存日志

nohup mosquitto_sub -h emqx.qnservice.com -p 1883 -t rtmp-stream-208 >> rtmp-stream-208 &

mp4转flv

ffmpeg -i source.mp4 -c:v libx264 -ar 22050 -crf 28 destinationfile.flv

ffprobe dump frame

ffprobe -show_data -show_packets xxx.ts

find & cp

find . -name *.a -exec cp {} lib \;

task搜索

task has: xxx

更改任务优先级

task 44 modify pri:H

gdb打印内存块

p/x *_pFrame@16

gcc查看预定于平台相关宏

gcc   -dM -E -x c /dev/null

docker断网

docker network disconnect network container

brew切换源

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc

生成ssh key

ssh-keygen -t rsa -C "your.email@example.com" -b 4096
pbcopy < ~/.ssh/id_rsa.pub

mac设置开机自动挂载

vifs
UUID=A39FA8F4-F482-4259-AE1B-A677CEE15986 /Users/rigensen/workspace auto auto

mac安装docker

brew cask install docker

安装vundle

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

安装gnu工具

brew install coreutils
brew install findutils --with-default-names

docker file build

docker build -t link-v2 .

qemu

使用qemu-img创建虚拟机镜像

qemu-img create -f qcow2 test-vm-1.qcow2 10G

-f 选项用于指定镜像的格式,qcow2 格式是 Qemu 最常用的镜像格式,采用来写时复制技术来优化性能。test-vm-1.qcow2 是镜像文件的名字,10G是镜像文件大小。镜像文件创建完成后,可使用 qemu-system-x86 来启动x86 架构的虚拟机

启动 VM 安装操作系统镜像

qemu-system-x86_64 -m 2048 -enable-kvm test-vm-1.qcow2 -cdrom ./Centos-Desktop-x86_64-20-1.iso

运行单个程序qemu-arm

例如: 原来运行命令

<executable> <arg1> <arg2> ...

使用qemu-arm运行

qemu-arm <executable> <arg1> <arg2> ...

查看某一个包信息

dpkg -L qemu

tar解压到指定目录

tar xxx -C xxx
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值