Linux common commands (i)

Source: Internet
Author: User

1. Command format:

command-option parameters such as: LS-LA/USR ls:

Displaying a list of files and directories

Common parameters:-L (Long)-A (all)-T (time)

2. Classification of commands

Internal command: Part of the shell Parser CD switch directory (change directory) PWD displays the current working directory (print working directory) help

External command: File program ls display file and directory list mkdir create directory (make Directoriy) CP copy file or directory (copy) independent of Shell parser

To view the Help document internal commands: Helper + commands external command: Man + command (man ls)

3. Operation file or directory common commands

PWD Displays the current working directory (print working directory)

Touch Create empty file > mkdir Create directory (make Directoriy)

-P Parent Directory is not present in the case of Mr. Cheng-parent directory (parents)

CP Copy file or directory (copy)

-R recursive processing to copy files and subdirectories under the specified directory (recursive)

MV move file or directory, file or directory rename (move)

RM Delete file (remove)

-R Delete all files in this directory at the same time (recursive)

-F force Removal of files or directories (forces)

RmDir Delete Empty directory (remove Directoriy)

Cat display text file contents (catenate)

More, less pagination displays text file contents

Head, tail View the contents of the beginning or end of the text

Head-n 5 A.log View the first 5 lines of the A.log file

Tail-f 5 B.log Loop Read (fellow)

Linux common commands (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.