Summary of common linux commands and common linux commands

Source: Internet
Author: User

Summary of common linux commands and common linux commands

I. Summary of common linux commands

Cd: Open the Directory

Cd/home to the '/home' directory'

Cd .. back to the upper-level directory

Cd... returns the last two levels of directories.

Cd to enter your home directory

Cd-return the last directory

Pwd display working path

Ll: list all sub-files in the current directory

Ls: list all sub-files (including hidden files)

Ls-F: view files in the directory

Ls-l displays detailed information about files and directories

Ls-a: Show Hidden Files

Make: Compile the code

-J + parameter: Number of threads set during compilation

".": Indicates that the command is executed.

Mkdir dir1 creates a directory named 'dir1'

Mkdir dir1 dir2 creates two directories at the same time

Mkdir-p/tmp/dir1/dir2 create a directory tree

Rm-f file1: delete a file named 'file1'

Rmdir dir1 deletes a directory named 'dir1'

Rm-rf dir1: delete a directory named 'dir1' and delete its contents at the same time.

Rm-rf dir1 dir2 simultaneously deletes two directories and their contents

Mv dir1 new_dir rename/move a directory

Cp file1 file2 copy a file

Cp dir/*. Copy all files in a directory to the current working directory.

Cp-a/tmp/dir1. Copy a directory to the current working directory.

Cp-a dir1 dir2 copies a directory

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.