command of Linux (1)

Source: Internet
Author: User

Create command

1. Create a Directory

mkdir (make directory) directory name example: mkdir 123

mkdir Directory name 1/directory Name 2 example: mkdir 123/456 (1 and 2 directories adjacent)

2. Create a document

Gedit Document name Example: Gedit 1.c

3. Create a shortcut

Ln-s Linked-file Link-name

Open command (CD)

1. Open subdirectories of the current directory

CD Name-of-directory

2. Open the parent directory of the current directory

Cd..

3. Open the Home directory

Cd

4. Open a user's home directory

CD ~bill

Copy command

1. Copying files in the current directory

CP Sourse-file Dest-file

2. Copy multiple files to the directory

CP file1 File2 Directory

3. Copy all items in the directory

Cp-r Source-dir Dest-dir

Rsync-a source-dir/dest-dir/

Delete command

1. delete files or shortcuts

RM file1 Link1

2. Delete Empty directory

RmDir dir

3. Delete a non-empty directory

Rm-rf dir

Print command

1. Print the current directory address

Pwd

2. Print all files (not starting with.)

Ls

3. List all information

Ls-l

4. List all files (including starting with.)

Ls-a

5. Chronological order

Ls-t

6. By size

Ls-s

7. Reverse Order

Ls-r

8. The more new The more backward

Ls-ltr

9. List the bugs in the name

LS *bug*

10. List the end of the.

LS *.?

Connection command (directly displayed in the command interface)

1. Connection files

Cat File1 File2

2. Connection files But delimited

More File1 File2

3. Connect all

Cat *

4. Connect all hidden files (start with.)

Cat. *

4. Connect all with log as suffix

Cat *.log

Rename command

MV Source-file Dest-file

A Linux command can execute multiple commands on a single line, such as Ls-a-l equivalent to performing ls-a+ls-l

command of Linux (1)

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.