Useful tricks for Ubuntu / Ubunt
2018-03-18 本文已影响17人
松山剑客
Useful tricks
Useful tricks in Linux using and server managing
(specifically, a Ubuntu desktop version and a server version)
- Use
ls -lhto identify the size of your files - To mount your portable disk on a Ubuntu PC, you need to
sudo mkdir /mnt/my_disk1and thensudo mount /dev/sdf1 /mnt/my_disk1/. After these steps, you will be able to read and operate your disk via/mnt/my_disk1 - To unmount your disk, just try
sudo umount /dev/sdf1and then pull off your disk. - Record the file structure of 4 level in current directory.
sudo tree -L 4 | sudo tee log.txt - The advance media player is
mplayer - Use
renameto rename all the files under a folderrename 's/(..)(.*)/$2/p' *.txt - Use
dos2unixto erease the windows style^Mat the end of each line. - Delete the
\nof all the lines in a file / Merge all the lines into one single lineawk '{printf $0}' 1.txt - 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 - Check the dependency of a software, take octave as an example
sudo apt-get build-dep octave - Shutdown the Bluetooth function from the beginning. Add this sentence to
rc.localrfkill block bluetooth
使用技巧
中文版?不存在的,脑子一热就写了英文的