Linux embedded system design of the second week of classroom curriculum expansion

# 20 self-command
1.cat
rows cat -n file1 marked files
cat -b file1 and -n similar, except for the blank line is not numbered
cat -s file when faced with more than two consecutive blank lines, on substitution line of blank lines
cat -E or displayed at the end of each line $
2.cmp
CMP file file1 file2 if the same message is not displayed. If the file is different, a different position of the first display
cmp -c addition marked differences at the decimal word outside together display the character corresponding to the character
cmp -i designate all the different places
3.diff for comparison the difference file
diff log2014.log log2013.log -y -W 50 -y output side format, -W represents a width
diff -c show all the text, and marked differences
4.file used to identify the file type
file -b when listing the identification result, do not display the file name
5.find used to find files in the specified directory
find. -name "* .c" the current directory and its subdirectories for all file name extension is c file list to
find. -type f the current directory of all its subdirectories under the general document lists
6.n command is a very important command, its function is to establish a link synchronization at another location for a particular file
ln -s log2013.log link2013 create a soft link
ln log2013.log ln2013 create hard links
7.less free to browse files
less view files
less file1 file2 exploring multiple files in the next n, p on a
history | less command to view historical usage records
8.locate command is used to find qualified document
the locate file1
the locate and find different: find is hard to find, locate only find in / var / lib / slocate database
9.paste command column merge file
contents paste file testfile testfile1 merge the specified file
paste -s file merge multiple rows of data specified file
10 .slocate command to find a file or directory
slocate fdisk shows the path name of the file containing fdisk keyword information
11.split command is used to split a file into several
split -6 README the README file every six lines into a file
more after the command is executed, the instruction "split" will be the original large file "README" to cut into "x" at the beginning of small files. In these small files, each file is only 6 lines of context. Using the command "ls" to view the current directory structure
12. tee command is used to read the data of the standard input, and outputs its contents to a file
tee file1 file2 # copy the contents of the file in two
or more execution command, prompts the user to enter save the data file
and then type what you want to enter, open the file to see if the tee command to achieve
13.umask preset command specifies when creating the file permission mask
row command for filtering 14.colrm specified
pressing the Enter key, the cursor will blink on the first line, waiting for standard input, when the input character, such as "Hello Linux!", the second line will appear the same content as the first line and press the enter key, then press Ctrl + C key combination to quit
everything after the first four as you want to delete
colrm instruction from the standard input device secretary read, turn output to the standard output device. If no arguments, the instruction is not any line filter
colrm 4 6 4 to delete the contents of Column 6
15.comm command is used to compare two rows of through sequence file
comm aaa.txt bbb.txt
output the first column contains only appear in aaa.txt column, the second column comprises a column appearing in bbb.txt, the third column contains the columns and aaa.txt bbb.txt are included in
16.ed command text editor for text editing
Here Insert Picture Description

17.look command is used to look up words
look L testfile find the words to "L" at the beginning of
18.tr command for character translation or delete files in the
cat testfile | tr az AZ file testfile in all lowercase letters to uppercase
19.wc command words for calculating
the number of rows calculated wc testfile wc specified file, words, and bytes
3 92 598 testfile testfile file number of rows is three, the number of words 92, the number of bytes 598
20.du command used to display the directory or file size
du log2012.log display the specified file space occupied by the
du -h test easy to read format display test case directory footprint

Released six original articles · won praise 0 · Views 291

Guess you like

Origin blog.csdn.net/wwgds/article/details/104704026