Linux commands (i)

Source: Internet
Author: User
Tags file copy

Date Show System Time

Clock: Show Hardware Time

Hwclock–w: Write the system time to the hardware

Hwclock–s: Write hardware time into the system

Cal:calender(Calendar)

printenv Display current environment variable information


Man Help

Internal command assistance: Help commands (command)

external command help:man command

Command manual:manual

Man commandwhatis command: Display command summary information

Man Sub-chapters:

1: User command

2: System call

3: library call

4: Special files (device files)

5: File format (configuration file syntax)

6: Game

7: Miscellaneous (miscellaneous)

8: Management Command (/sbin,/use/sbin,/usr/local/sbin)

Man 's Operation command:

space: Turn back one screen

b: Flip one screen forward

Enter: Turn back one screen

K: Flip one screen forward

Find:

/keyword : Finding keywords backwards

N: Next N: Previous

? keyword: finding keywords forward

N: Next N: Previous

Q: Exit Man

Directory file Management

mkdir (make directory): Create a directory

RmDir: Deleting a directory

-P: recursive creation

-V: Display creation information

RM (Remove directory): Delete directory

-I: interactive delete

-F: Force Delete

-R: recursive delete

Touch : Create File

-C: not created when file exists

-A: Change access time only

-M: Change the modification time only

-T: Specifies the timestamp of the file (month, day, and seconds), used in conjunction with a,m

file : Used to view the types of common files and system files

Cp (copy) file copy, a file to a file or multiple files to a directory

-R: recursively copy to directory

-I: Interactive display replication

-F: Forced replication, overwriting

-P: Preserve the properties of the source file, timestamp

-A: Preserves all properties of the source file (archive replication, often used for backups)

-P: Save as Link when copying linked files (default is the file that the copy link points to)

-D: Keep links when copying

Mv (move) to move a file

Mv SRC ( source ) DEST(target)

can be renamed with MV in the Unified directory :MV ACB BCD or mv-t target source

-I: Interactive mobile

-F: forced override

-T: Target re-source first

Install : Object can only be a file

-D direcotry .... : Creating a directory

-M: Specify Permissions

- T : Specify the target, and then specify the source


Text command

Cat : Connect and display the information of the file, which is all the information in the display file.

-N: Displays line numbers, which are not related to the contents of the file, and each line is numbered when displayed

-E: Displays the line terminator for each line

-T: Show Tabs

-A: Show all symbols

-V: Display other nonprinting characters

More :The effect of more is the same as cat, but at this point we can manually flip the screen, more convenient

More only support backward turn, turn to the end of the direct exit

Less : Displays the file information, the default does not exit the display,Q can exit

space: Turn back one screen

b: Flip one screen forward

Enter: Turn back one line

K: Turn forward one line

Find:

/keyword: Find keywords

Head : Displays the first few lines of the file, the default is ten lines

-num: How many lines are displayed after

-F: View the end of thefile without exiting, waiting for new additions to appear

Cut : Used to cut data content

-D: Specifies the field separator, which is the default space

-F: Specify the fields to display

-F 1,3 : Indicates the display of the first 1 and the first 3

-f1-3 : Indicates the display of the first 1 to the first 3

Sort : Text sorting, simply sorting the displayed files without affecting the order of the source files, is based on Assii Code of the word Fu Shen order to sort.

-N: Numeric size sorting

-R: Reverse sort

-T: Field delimiter

-K: Which field is the keyword to sort

-u: The same row is only displayed once after sorting

-F: Ignore character case


Unip : report or ignore duplicate rows

-D: Show only duplicate rows

-C: Displays the number of repeated rows in the file

Wc (Word count): text statistics, you can count the number of lines in a file, how many words, how many bytes

-L: Show only the number of rows

-W: Displays only the number of words

-C: Show only the number of bytes

Tr: converting or deleting characters

TR:{Option}....set1[set2]

Example:tr ab ab put lowercase ab all transposition Capital AB

- D : Delete all characters that appear in the character set




This article from "The world, hard people can be more" blog, please be sure to keep this source http://wangkanglinux.blog.51cto.com/8837012/1685873

Linux command (i)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.