Basic Linux system operations (1)

Source: Internet
Author: User

Write and write

1. Basic commands.

(1) LS (list directory content)

Ls. Current directory;

Ls.. Previous level directory;

Ls-l is listed as a list;

Ls-a list all Files-all;

Ls-h with unit-human-readable;

Ls-t in chronological order-time;

Ls-r recursively lists all the information under all directories including subdirectories;

(2) Touch

If the file does not exist, create the file, if the file exists, update the file time, will not change the contents of the file;

(3) mkdir Create a directory

mkdir Directorys Create a single-level directory can be multiple;
mkdir Directory1/directory2 If 1 does not exist, then-P creates a multilevel directory;

(4) CD Change working directory

CD home directory;
CD ~ Home directory;
CD-to the previous jump to the directory (from which to go back to where);
CD/to root directory;

(5) RM Remove files or Directorys

Rm-r delete a directory;
Rm-f Delete is not prompted to force the deletion;

(6) CP copy file or directory

CP file1 File2 will file1 cuff to file2;

CP file1 directory to copy files to the directory;

CP file1 file2 directory3 FILE...N directory copy files or directories into one directory but must ensure that the last is the directory;

CP *.c AAA Copy all files ending in. c to the AAA directory;

\CP overlay mode does not indicate whether to overwrite;

CP Directory1 Directory2-r If there is no direct copy directory2, if the directory2 exists, copy to the next level of the Directory2 directory;

(7) MV move cut or rename
MV File1 File2
MV Directory1 Directory2 If Directory2 does not exist, rename if Directory2 exists cut to Directory2 directory;

(10) Shutdown instructions
Shutdown
Halt
Halt-p-F Direct-cut power supply
Init 0
Restart restart
Reboot

Basic Linux system operations (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.