Kali Linux Commands

Source: Internet
Author: User

PWD Displays the current path

RM command

"rm -f" 强行删除,忽略不存在的文件,不提示确认。(f为force的意思)

"rm -i" 进行交互式删除,即删除时会提示确认。(i为interactive的意思)

"rm -r" 将参数中列出的全部目录和子目录进行递归删除。(r为recursive的意思)

"rm -v" 详细显示删除操作进行的步骤。(v为verbose的意思)

Locate command

Find a specific path to a file

Cat command

Reads the contents of the file and displays

Cat is often used to display the contents of a file

-N or-number: 1 starts numbering the number of rows for all outputs;

-B or--number-nonblank: Similar to-n, except that blank lines are not numbered;

-S or--squeeze-blank: When encountering two consecutive lines above the blank line, the substitution is a row of blank lines;

-A: Display non-printable characters, end of line showing "$"

Cat M1 (displays the contents of the file ml on the screen)

Cat M1 m2 (simultaneous display of files ml and m2 content)

Cat M1 m2 > file (merging Files ml and m2 into file files)


Head command

Head/var/log/messages Display the contents of the first 10 rows

Command parameters

-n< Digit;: Specifies the number of rows to display the contents of the header;

-c< character count;: Specifies the number of characters to display the contents of the header;

-V: Always displays the header information of the file name;

-Q: The header information for the file name is not displayed.
For example:

Head-n 3/var/log/messages Display the contents of the first three rows

Head-c 10/var/logmessages Display first 10 characters

Clear Erase Screen

Kali Linux Commands

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.