Useful tricks
Useful tricks in Linux using and server managing
(specifically, a Ubuntu desktop version and a server version)
- Use
ls -lh
to identify the size of your files - To mount your portable disk on a Ubuntu PC, you need to
sudo mkdir /mnt/my_disk1
and 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/sdf1
and 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
rename
to rename all the files under a folderrename 's/(..)(.*)/$2/p' *.txt
- Use
dos2unix
to erease the windows style^M
at the end of each line. - Delete the
\n
of 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.local
rfkill block bluetooth
使用技巧
中文版?不存在的,脑子一热就写了英文的