llinux Advanced articles

  1. df view disk space

    1. df -h (after the units have added)

  2. free instruction, view memory usage

    1. free -m (mb represents a unit of view)

  3. head to view a file before n rows, if n is not it defaults to the first 10 lines

    1. head plus file path

    2. head -5 plus file paths (see the first five lines)

  4. see the tail end of n lines of a file, if n is not specified, it defaults to 10 rows back

    1. tail plus file path

    2. tail -1 plus file path (see the last line of the last)

    3. Dynamic changes in tail -f view files

  5. less View all files

    1. less + file path (auxiliary key: You can view digital from start to see the first few lines)

  6. wc statistics file content information (including our number of lines and words, bytes)

    1. wc-lwc need statistics file path

    2. wc-l file path (the number of rows)

    3. wc-w file path (number of words)

    4. wc-c file path (bytes)

  7. date (emphasis) indicates the operation time and date (read Set)

    1. Output date (November 2019 Saturday, 9)

    2. date +% F is 2018-11-9 (corresponding to date "+% Y-% m-% d")

    3. date "% F% T" when the year, month, day, hour (quotation marks as a whole) (corresponding to the date "+% Y-% m-% d% H% M% S")

Guess you like

Origin www.cnblogs.com/liuxiaomo/p/11956913.html