Linux Common Commands Summary notes (i) __linux

Source: Internet
Author: User
Tags mkdir file permissions

Command 1:ls

Original intent: List

Features: Displaying catalog files

Syntax: ls-a display all files, including hidden files

Ls-l Detailed information display

Ls-d View Directory Properties

Example: Ls-l/bin

Drwxr-xr-x 2 root 4096 13-01 01:23

File permissions Hard link number owner group file size created or last modified

Command 2:CD

Original intention: Changedirectory

Functions: Switching directories

Syntax: CD [directory]

Example: cd/switch to root directory

Cd.. Go back to the top level directory

Command 3:pwd

Original intention: Printworking directory

Features: Displays the current working directory

Syntax: pwd

Command 4:mkdir

Original intention: Makedirectory

Syntax: mkdir [Table of contents]

Function: Create a new directory

Command 5:touch

Original intention: Touch

Function: Create an empty file

Syntax: touch [filename]

Example: Touchnewfile

Command 6:CP

Original intention: Copy

Features: Copying Files or directories

Syntax: CP [source file or source directory] [destination directory]

Example: CP file1file2 Dir1

Copy files File1, file2 to directory Dir1 (you can copy multiple files at the same time, separated by spaces)

CP Dir1 DIR2

Copy all files and subdirectories under Dir1 to Dir2


Command 7:MV

Original intent: Move

Features: Moving files to rename files

Syntax: MV [source file or source directory] [destination directory]

Example: MV File1file2

Rename the file file1 to File3

MV File2 Dir2

Move file file2 to directory Dir2

Command 8:RM

Original intention: Remove

Features: Deleting catalogs

Syntax: RM [File]

rm–r [Directory]

Example: RM file1

Delete file File1

Rm–r Dir1

Delete directory Dir1

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.