Linux Command 5

file display

  $cat filename show file   

  $cat file1 file2 connection shows file1 and file2 $head -1 filename shows the first line of the file

  $tail -5 filename displays the fifth last line of the file $diff file1 file2 displays the difference between file1 and file2

  $sort filename sorts the lines in the file and displays   

  $sort -f filename sort, regardless of case   

  $sort -u filename sort and remove duplicate lines

  $uniq filename displays the non-repeated lines in the file filename (lines with the same content, but not adjacent to each other, do not count as duplicates)

  $wc filename counts characters, words, and lines in a file   

  $wc -l filename count the number of lines in the file

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324976124&siteId=291194637