Useful tricks for Ubuntu / Ubuntu 使用技巧

Useful tricks

Useful tricks in Linux using and server managing
(specifically, a Ubuntu desktop version and a server version)

  1. Use ls -lh to identify the size of your files
  2. To mount your portable disk on a Ubuntu PC, you need to sudo mkdir /mnt/my_disk1 and then sudo mount /dev/sdf1 /mnt/my_disk1/. After these steps, you will be able to read and operate your disk via /mnt/my_disk1
  3. To unmount your disk, just try sudo umount /dev/sdf1 and then pull off your disk.
  4. Record the file structure of 4 level in current directory. sudo tree -L 4 | sudo tee log.txt
  5. The advance media player is mplayer
  6. Use rename to rename all the files under a folder rename 's/(..)(.*)/$2/p' *.txt
  7. Use dos2unix to erease the windows style ^M at the end of each line.
  8. Delete the \n of all the lines in a file / Merge all the lines into one single line awk '{printf $0}' 1.txt
  9. Mount a NTFS disk of hyperating windows in Ubuntu
    sudo mkdir /media/windows /media/D
    sudo mount -t ntfs-3g -o ro /dev/sda4 /media/windows
    sudo mount -t ntfs-3g -o ro /dev/sda6 /media/D
  10. Check the dependency of a software, take octave as an example sudo apt-get build-dep octave
  11. Shutdown the Bluetooth function from the beginning. Add this sentence to rc.local rfkill block bluetooth

使用技巧

中文版?不存在的,脑子一热就写了英文的

    原文作者:KingLeo
    原文地址: https://www.jianshu.com/p/e7b8d3169fa0
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞