[Continuous update] Commonly used tool commands

SVN

  • checkout takes out:svn co <URL>
  • update Update: If there is a local warehouse, execute update to get the latest:svn update
  • View all logs:svn log
  • View last 3 versionssvn log -l 3
  • commit submit
svn add 文件名
svn commit -m "版本信息"
  • Delete files: directly using rmcommands can not really delete
svn delete 文件名
svn commit -m "版本信息"
  • current file statussvn status
  • view current versionsvn info

docker

  • Start the containerdocker run -it ubuntu /bin/bash
  • nvidia-docker2 start containerdocker run -it --gpus all ubuntu /bin/bash
  • exit containerexit
  • into the container again docker exec -it <容器ID> /bin/bash. If you exit from this container, the container will not stop,
  • Open multiple terminals: docker exec -it <容器ID> /bin/bash.
  • stop containerdocker stop <容器 ID>
  • Restart the containerdocker start <容器 ID>
  • Restart the containerdocker restart <容器 ID>
  • Copy from host to dockersudo docker cp 本地文件的路径 container_id:<docker容器内的路径>
  • Copy from docker to hostsudo docker cp container_id:<docker容器内的路径> 本地文件的路径
  • check versioncat /etc/issue

Linux

  • Reference GPU status:nvidia-smi
  • View CPU status:top
  • Check disk space:df -h
  • Kill the GUI program:xkill
  • Write physical address: devmem 0x4000000 32 0x12345678up to 64 bits
  • Read physical address: devmem 0x4000000 32up to 64 bits
  • Unzip the file to the current directory:tar -zxvf 文件名.tar.gz
  • Unzip the specified file folder:tar -zxvf 文件名.tar.gz -C <路径>
  • Compressed file:tar -zcvf tarname.tar.gz dir/files
  • Install the deb installation package:dpkg -i 文件名.deb
  • Find characters in the current folder:grep <字符> -R

petalinux

  • clean, delete the build directory, keep the images directory: petalinux-build -x distclean
  • clean, delete all:petalinux-build -x mrproper

conda

  • Conda turns off the automatic activation of the virtual environment:conda config --set auto_activate_base false
  • Enter the base virtual environmentconda activate base
  • Exit the virtual environmentconda deactivate

pdb debugging ( official documentation )

  • insert breakpointimport pdb; pdb.set_trace()
  • print the context of the running locationl
  • print variablep [变量名]
  • Step over without entering the functionn
  • Single-step debugging, enter the functions
  • Step out, step out of the current functionr
  • continue, run to the next breakpointc
  • Output the parameter list of the current functiona

vnc viewer

  • start upvncserver
  • Set port and screen ratiovncserver -geometry 2340x1440 :80
  • View pre-existing ports and processesvncserver -list
  • kill ports and processesvncserver -kill :80

vim

  • Function jump Ctrl + ], jump back `Ctrl+o
  • replace full text string:%s/str1/str2/g
  • file comparisonvim -d file1 file2
  • choosev
  • copyy
  • Copy word yaw, text object: aw: a word; as: a sentence; ap: a paragraph; ab: a piece (included in parentheses).
  • copy current lineyy
  • pastep
  • revokeu
  • recoverctrl+r
  • find up and down/Nn
  • Select all ggvG, ggmove the cursor to the first line, and Gmove the cursor to the last line
  • copy allggyG
  • delete allggdG
  • delete current linedd
  • delete worddaw
  • jump to the specified line17G
  • Skip to the beginning of the line and enter edit mode directly I, jump to the end of the line and enter edit mode directlyA
  • Completionctrl+n
  • Insert blank lines before and after this line and enter edit mode directlyO/o
  • highlightgd
  • show line number:set nu

mpsoc kernel compilation

Operate in the kernel root directory

  • clean up projectmake ARCH=arm64 CROSS_COMPILE=aarch64-none-elf- distclean
  • Configure the kernel using configuration filesmake ARCH=arm64 CROSS_COMPILE=aarch64-none-elf- zynqmp_petalinuxconfig_defconfig
  • Open the graphical interface to configure the kernelmake ARCH=arm64 CROSS_COMPILE=aarch64-none-elf- menuconfig
  • kernel compilation- make ARCH=arm64 CROSS_COMPILE=aarch64-none-elf- -j 32
  • image package image.ub, put .its in the root directorymkimage -f fit-image-petalinux-user-image.its image.ub

Guess you like

Origin blog.csdn.net/lb5482464/article/details/126385553