Summarize the Linux commands used.
(Linux Command Summary: http://linux.chinaitlab.com/special/linuxcom)
1)
View and sort the size of a folder.(
Du,
SortCommand combination)
For example, the current folder is
. Cache
$ Du -- Max-depth = 3-H | sort-hr
680 m.
657 m./tracker
17 m./abrt/spool/ccpp-2012-09-08-21: 12: 57-1942
17 m./abrt/spool
17 m./abrt
5.2 m./Kingsoft
3.6 m./Kingsoft/WPP/HTTP
3.6 m./Kingsoft/WPP
1.7 m./Kingsoft/WPS/HTTP
1.7 m./Kingsoft/WPS
852 K./ibus
768 K./Wallpaper
684 K./ibus/Bus
92 K./ibus/libpinyin
72 K./ibus/pinyin
Note: Du-estimate file space usage (see Man Du for details)
Sort-Sort lines of text files (for details, see man sort)
2) display a column. (
Cut command)
$ Date
Wed Jan 2 10:22:52 CST 2013
$ Date | cut-D ''-F5
10:23:33
3) Search for a file in the directory. (Tree, grep)
$ Tree | grep-C 5 "busybox"
4) use grep in the file to search for multiple keywords (grep)
$ Grep-e "Open | create" fcntl. h
Note: The knowledge of using regular expressions, where '|' indicates or.
5) solve Chinese garbled characters
$ Convmv-f gbk-T UTF-8-r -- notest *
(From GBK to UTF-8, change the subdirectory and correct the file name .)
6) create a GIF Image
$ Convert-delay 0 photo-00 {16 .. 23} *-loop 0 test.gif
(Note: {16 .. 23} represents 16 17 18
... 23 is easy to use .)