Useful Linux Commands
.在特定類型的文件裡找字串
grep -ir “ooxx“ –include=”*.java”
.掛載外接硬碟
sudo fdisk -l
mkdir /media/usb
sudo mount -v -t auto /dev/sdb1 /media/usb
.找特定類型的檔案
find -iname *.git
.確認編譯出來檔案的 ELF
readelf
.列出所有執行的東西
ps -Al
.用 string2 取代 file1 裡的 string1,存成 file2
awk ‘{gsub(/string1/,”string2″)}1’ file1 > file2
.remove specific directory recursively
find . -name SPECIFIC_FILE -type d -exec rm -rf {} \;
.Check lib with readelf
“readelf xxx.so -h” can display the information of your library.
I usually use to check the “machine” which is aarch64 or x86.
Want to know more about ELF?
“ELF (Executable and Linkable Format)學習途徑與資源” by 陳孜穎
Last modified 1yr ago