Linux Common commands

Source: Internet
Author: User

Guard Gerd

Linux Common commands

mkdir folder name mkdir Hello//Create new Folder

Touch filename Touch hello.txt//Create new file

VI File name VI aaa.html//edit, if the file is not created and into the edit
Vim filename vim aaa.txt//Highlight Edit

RM//Delete
RM-RF//Direct Delete

CP//Copy CP aaa.html/usr/local

Packaging and decompression
Unzip Xxx.zip

The TAR command uses
Compression: Tar CVFZ destination Document source Document 1 [Source Document 2 ...]
Example: Tar cvfz m.tar.gz hello.cpp hello.h //m.tar.gz is the target document, Hello.cpp and Hello.h are Source Document

Unzip: Tar XVFZ target Document
Example: Tar xvfz m.tar.gz//Extract compressed package document M.TAR.GZ in current directory

chmod 777 File
Most of us represent permissions in the form of three-bit octal digits, the first specifies the owner's permission, the second specifies the group permissions, and the third refers to
The permissions of other users, each with 4 (read), 2 (write), 1 (execution) of three numeric values to determine the permissions. If 6 (4+2) represents a read
Write right, 7 (4+2+1) has read, write, and execute permissions.

+
Increase permissions

-
Delete permissions

=
Reassign permissions

R
Read

W
Write

X
Perform

-R
Recursively traverse subdirectories to apply changes to all files and subdirectories in the directory

U
Owner

G
Group

O
Other users

A
All Users

Example:
chmod u+x file adds execute permission to the owner of file

The chmod 751 file assigns read, write, and execute (7) permissions to the owner of the file, assigning read,
Perform (5) permissions to assign permissions to other users to execute (1).

chmod a-wr,a+x file Deletes write, read permissions to all users of file and increases the permissions to execute

chmod =x file reassign permissions to all users of file, only to execute permissions

Chmod-r u+r Directory Read permissions to the owner of all files and subdirectories in directory directory

Chmod-r a+rwx Directory assigns all users in the directory directory to all files and subdirectories read, write,
Permissions for rows


./install.sh


Init 0 is the shutdown system, init 1 restarts the system.

Shutdown-r now restarts the system after shutting down the system

Linux Common commands

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.