Skip to content

dreamflyforever/linux_tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

中文页

zsh

install: sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

terminator

安装: sudo apt-get install terminator

markdown

terminal

ag search the key world ctrl r search the command when you use in the history

gvim

combinationkey

ctrl o go front
ctrl i go back
enter command sp . split screen
enter command vsp . virtical split screen
press ctrl v and hjkl to select region
u cancel
ctrl z opposite cancel
jklh direction key

~/.vimrc:

colorscheme evening   
imap jj <esc>  #enter jj will switch edit mode to command mode  
set hlsearch  
set incsearch  
set autoindent  

update_db.sh

Execute the script update_db.sh, then will product some files, and open the gvim, enter the commandcs add cscope.out, you can use the shortcut key to search the code and go where you want.
combination key ctrl ] : goto where that the cursor to the function or variety
when you want to know where to call the function or variety, end the command "cs f e keyword_you_want"

terminator

split screen for terminal
ctrl shit o, ctrl shit e to split screen

memory check

valgrind --leak-check=full your-program

build HTTP server

python2 : python -m SimpleHTTPServer python3 : python3 -m http.server

web get quickly

axel -n 10 -o /tmp/ http://soft.vpser.net/lnmp/lnmp0.7-full.tar.gz

uart

sudo miniterm /dev/ttyUSB0 115200

search line for string > 80 char

awk 'length>80' file

search big file

find . -type f -size +800M -print0 | xargs -0 du -h | sort -nr

audio

tinycap /sdcard/rec.wav -D 0 -d 0 -c 2 -r 44100 -b 16 -p 1024 -n 3 notice: -c channel must right mic number tinyplay /data/audio/Steppin_Out.wav -D 0 -d 0 -n 3 amix "IN2 Boost" amix "ADC Capture Volume"

wifi config by command

sudo iw dev wlan0 scan | less (ps: wlan is your PC wireless card name) wpa_passphrase Pd_robot_5G pdpdpdpd > /etc/wpa_supplicant.conf wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B dhclient wlan0 ip addr

rj45 directly connect

ifconfig eth0 192.168.0.1 netmask 255.255.255.0 ping -I eth0 another_compute_ip

usb speed test

echo "read from SSD....." sudo sh -c "sync && echo 3 > /proc/sys/vm/drop_caches" sudo dd if=/media/jim/your_ssd/big_file of=/home/big_file bs=1024576 count=1024 sudo sh -c "sync && echo 3 > /proc/sys/vm/drop_caches"

echo "write to SSD....." dd if=~/workspace/big_file of=/media/jim/your_ssd/big_file bs=1M count=1024 sudo rm /home/big_file

read cpu temperature

watch -n 1 cat /sys/class/thermal/thermal_zone1/temp

iperf test

server: iperf -s client: iperf -c $1 -p 5001 -i 1 -t 1000000

player audio pcm

ffplay -f s16le -ar 16000 -ac 1 -autoexit sound.pcm

self-start

gnome-session-properties

sshd

sudo apt install openssh-server sudo /etc/init.d/ssh start

audio change hz

ffmpeg -i input -ac 1 -ar 48000 -y output

get linux stand library souce code

apt-get source libasound2-dev

tcp capture text

sudo tshark -Y 'websocket' -V -T text

search system lib & head file

pkg-config --libs opencv pkg-config --cflags opencv

ffplay camera

ffplay -f v4l2 -video_size 1600x1200 -framerate 30 -pixel_format yuyv422 /dev/video0 ffmpeg -f v4l2 -video_size 1920x1080 -framerate 30 -input_format h264 -i /dev/video0 -c copy output.mp4 v4l2-ctl -d /dev/video0 --list-formats-ext ffplay -f rawvideo -pixel_format rgb24 -video_size 640x400 color_32.rgb888

ssh login

ssh-copy-id -i ~/.ssh/id_rsa.pub root@192.168.235.22

nvidia

nvcc -V
nvidia-smi

rtsp build

server: python3 stream.py --device_id 4 --fps 30 --image_width 640 --image_height 480 --port 8554 --stream_uri /video_stream client: ffplay rtsp://10.1.2.68:8554/video_stream
ffmpeg -i rtsp://10.1.2.68:8554/video_stream -c copy output.mp4 python detect.py --weights yolov5s.pt --source rtsp://10.1.2.68:8554/video_stream​

'perf top -p' to test program any part

otool -L

check library in macos

docker

docker run -it -v /home/haha/下载:/share microsoft/dotnet:latest /bin/bash

git cloe fast

git clone http://githubfast.com/dreamflyforever/libv4l2

sed command

sed -i "s/^2/4/g" ls

copyright

MIT by Jim

About

This project is for user use linux system more convince and effectively.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages