1. 將grep出來的文字replace
grep -rl matchstring somedir | xargs sed -i 's/string1/string2/g'
ex: grep -rl 'ABCD' * |xargs sed -i 's/ABCD/HEF/g'
2.將^M的換行符號拿掉
(1) sed "s/\r//" dos_file > dos_file_linux
(2) sed -i 's/\x0D$//' filename.txt
3. mount iso
sudo mount -t auto -o loop xxx.iso /mnt/iso
4. 安裝deb
dpkg -i abc.deb
5. 轉換PNG到PPM
(1) apt-get install netpnm
(2) pngtopnm sample.png > linuxlogo.pnm
(3) pnmquant 224 linuxlogo.pnm > linuxlogo224.pnm
(4) pnmtoplainpnm linuxlogo224.pnm > linuxlogo_clut224.ppm
PS. 如果要取代原linux logo, replace driver/vide/logo下的原圖檔.
5. copy folder to server
scp -r folder_name user@10.109.109.109:/home/user_name/folder_name
ex: scp -r TVBox favoritepili@10.109.109.109:/home/favoritepili/
6. Download file from server
scp -r user@10.109.109.109:/home/user/folder /home/user
ex: scp -r favoritepili@10.109.109.109:/home/favoritepili/TVBox /home/favoritepili
7. unload driver
sduo modprobe -r vboxpci
8. list module
(1) lsmod | grep vbox
(2) modprobe -l | grep vbox
9. load module
modprobe vboxdrv
沒有留言:
張貼留言