apt相关
sudo apt-get install cmake
sudo apt list --installed
sudo apt list --installed | grep ffmpeg
sudo apt-get update
sudo apt-get upgrade
sudo apt list --upgradable
sudo apt install --only-upgrade package_name
进程相关
gnome-system-monitor
ps aux
ps aux | grep $( process_name)
ps -ef
kill $( PID)
kill -9 $( PID)
调试指令
while true ; do df ; sleep 1 ; echo "\n " ; done
while true ; do cat /proc/meminfo | awk 'NR==1 || NR==2 || NR==3' ; sleep 1 ; echo "" ; done
jtop
挂载U盘
mkdir ~/work/
lsusb
fdisk -l
sudo mount /dev/sda1 ~/work/
sudo umount ~/work
sudo fdisk /dev/sdc
mkfs.ext4 /dev/sdc
空间相关
df
df -h
df ${path} | awk 'NR==2 {print $2}' | tr -d '\n'
df ${path} | awk 'NR==2 {print $4}' | tr -d '\n'
du -sh ~/folder
ls -lh
du -h -d 1
ssh远程
sudo apt-get install openssh-server
sudo apt-get install openssh-client
sudo service ssh status
ssh user@hostname
ssh -p ${port} user@hostname
ssh -p 10022 admin@192.168.1.123
scp /path/local/file username@remote_host:/path/remote/directory
scp username@remote_host:/path/remote/file /path/local/directory
scp -r /path/local/directory username@remote_host:/path/remote/directory
scp -P 2222 /home/user/test.txt user@192.168.1.100:/home/user/
sudo apt-get install sshfs
mkdir ~/remote/
sudo sshfs -o allow_other cidi@192.168.55.1:/ /home/admin/remote/
日志调试
tail -f log.txt
tail -n 200 log.txt
ffmpeg
ffplay video.h264
ffplay rtsp://192.168.1.224/stream1
ffmpeg -i video.mp4
ffmpeg -i test.mp4 -f flv output.flv
ffmpeg -i test.h264 -f mp4 output.mp4
ffmpeg -i test.mp4 -acodec copy -f mp4 output.mp4
ffmpeg -i test.mp4 -vcodec copy -f mp4 output.mp4
ffmpeg -i test.mp4 -codec copy -f mp4 output.mp4
ffmpeg -i test.mp4 out.gif
ffmpeg -i test.mp4 -ss 0 -t 2 -r 10 out.gif
ffplay -ar 44100 -ac 2 -f s16le -i test.pcm
ffmpeg -i test.jpg -s 640x480 -pix_fmt yuv420p test.yuv
ffplay -f rawvideo -video_size [ width] x[ height] -pixel_format [ format] your_yuv_file.yuv
ffplay -f rawvideo -video_size 1920x1080 -pix_fmt yuv420p out.yuv
ffmpeg -f lavfi -i testsrc = duration= 5 :size= 1280x720:rate= 30 test.mp4
ffmpeg -i test.mp4 -c:v libx264 -crf 23 -preset fast -c:a copy output.mp4