Ubuntu common commands
1. Is the SO library 32bit or 64bit?
# 命令:
file [file_name]
# 示例:
file libboost_filesystem.so.1.66.0
# output:
libboost_filesystem.so.1.66.0: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV),
dynamically linked, BuildID[sha1]=a6fa9bd49328a82b8905b37aaebf651f809a0770, with debug_info,
not stripped
2. Delete all content (files + folders) in the current directory
cd build
rm -rf *
3. What do the different colors represent in Ubuntu?
Green: static library, dynamic library, executable
light blue: soft link
Blue: folder
White: text file
4. tar compression, decompression
tar -czvf xxx.tar.gz source_file # 以tar.gz方式打包并gz方式压缩
tar -xzvf xxx.tar.gz -C path # 解压缩包,path:解压目标路径
5. View Linux CPU frequency
// 当前频率
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
816000
// 最大频率
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
1800000
// 最小频率
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq
408000
6. Check the frequency of NPU (RK board)
cd /sys/class/devfreq
Enter this path, there is fde40000.npu (different boards may be different)
cat fde40000.npu/max_freq
7. Hard disk mount
Function: Mount the server hard disk to the Ubuntu directory via IP
sudo mount -t nfs IP:/volume1/SLAM/3Dfurniture /home/robot/Project/kxh-DM2/
8. Memory release
# 释放所有的显卡显存
fuser -vk /dev/nvidia*
# 释放指定PID的显卡显存
kill -9 PID(需要查找自己的PID)