useful command
1. scp¶
copy from remote to local
copy from local to remote
2. du 目录信息¶
local current dir size
Bash
du -ah --max-depth=1
du -h -d 1
du --max-depth=1 -h -B G /home/ | sort -rn
du --max-depth=1 -h -B G . | sort -rn
3. 重导向¶
>> append
3.1. trash¶
3.2. To file¶
4. nm查看导出库¶
5. 杀死用户所有进程¶
5.1 pkill方式¶
5.2 killall方式¶
5.3 ps方式 ps列出zhangnq的pid,然后依次kill掉,比较繁琐。¶
5.4 pgrep方式 pgrep -u参数查出用户的所有pid,然后依次kill¶
6. 查看linux导出符号和依赖库¶
https://www.cnblogs.com/xiaomanon/p/4203671.html
1. nm *.a 静态库¶
2. nm *.so 动态库¶
3. ldd 查看依赖库¶
7. 输出正在运行的命令行¶
8. xdg-open¶
xdg-open用法非常简单,就直接参数传入要打开的文件,等效于鼠标双击打开,系统会根据文件类型自动调用对应的程序
9. 查看内存CPU等信息 & 绑定CPU¶
10. linux release¶
13 ln -s¶
批量建立符号链接¶
https://blog.csdn.net/hnlyyk/article/details/49303741
- 使用
ln命令
- 使用
cp命令的参数rs
- 写shell脚本,一个比较愚蠢的方法
14 file 查看文件类型¶
Bash
/home/shkzhang/llvm/build/bin/clang++ -c -o Playout.o -DSPEC -DNDEBUG -I. -DSPEC_AUTO_SUPPRESS_OPENMP -O3 -m64 -mcpu=power9 -fexperimental-new-pass-manager -fprofile-use=default.profdata -flto -Wl,-q -Wl,-rpath=/home/shkzhang/llvm/build/lib -DSPEC_LP64 Playout.cpp
[shkzhang@recycler:~/spec_clang_result/benchspec/CPU/541.leela_r/build/build_peak_clang_default.0000]$ file Playout.o
Playout.o: LLVM IR bitcode