Linux Learning Notes (ii) system common commands and some concepts

Source: Internet
Author: User
Tags clear screen unpack

Root user (Administrator) is the most privileged user (Universe invincible)


Liunx command line use format


command-[options] [parameters]

Option to invoke the specific function of the command

Parameters are object, file, directory name, etc. of command operation


TAB key: Auto-complete

Backslash \ Forced line break


Shortcut key ctrl+l: Clear Screen

Shortcut key CTRL + C: Cancel execution of this command


Get command Help:

Command--help

Man command


Shutdown and restart commands

Restart:

Shutdown-r now

Shutdown-r +15 "WARNING: System will restart in 15 minutes"

Reboot

Init 6

Shutdown:

Shutdown-h now

Init 0


LS View the file under the current path

Command options:

-l display in long format

-a displays all information about the file, including hidden files

-D Display the directory itself property

-R recursive display of content

-H already (k,m) display content


CD Switch Directory

PWD View the path to the current directory

mkdir creating a directory parameter-p for recursive creation

Du view directory and file space occupancy parameters:-A statistics all files,-H displays the information in K,m,-s only counts the total amount of space occupied by each parameter

Touch New Empty file

CP Copy parameter:-R recursively copies the entire directory,-P keeps the properties of the source file unchanged

RM (use with CAUTION!!! Delete parameter:-F forcibly Delete does not make reminders,-R recursive Delete

MV Move, if the target location and source file directory want to hear, then the equivalent of renaming

Find lookup, equivalent to a search under Windows. Parameters:-name Search by file name,-size file size Find,-user by file owner find,-type by file type search

* Wildcard Characters

Cat Displays the entire contents of the file, equivalent to Winddows Open text

More Paging mode display file contents, enter next page, b previous page, q exit

Head to view a portion of the file at the beginning. Format head-n file name, n shows how many lines to start with

Tail and head In contrast, display the end of the file, tail-n filename, tail-f file name can track changes in real-time files


Compression command:

gzip-d file name

Gzip-9 file name

bzip-d file name

Bzip-9 file name

-9: Indicates a high compression ratio

-D: Unzip compressed files


Tar pack, unpack

tar [options] Package name source file

tar [options] Package name-C Destination Directory


Parameters:

-C Create a package file in. tar format

-X unpack the. tar format package file

-V output when packaging or unpacking the details

-F means using an archive file

-P preserves original file and directory permissions when packaging

-t list view files within packages


Tar command

Parameters:

-C Unpack the target folder when you specify the release

-Z Call the GZIP program for compression or decompression

-j Call bZIP Program for compression or decompression


Unzip unzip the zip-format package

Zip compression


User: Superuser (root), normal user and program user

Groups: Basic groups (private groups), additional groups (public groups)

UID (user identily, subscriber representation number)

GID (group identify, set number)

1~499 Uid,gid is reserved for program users by default

UID and GID numbers used by normal users/groups are between 500~6000


User account File:

Basic information for saving users ' accounts

File Location:/etc/password

Each row corresponds to one user's account record

1: User's account name

2, User password

3, UID of the user

4, GID of the basic group account

5, user's full name

6, Host Directory

7, Login Shell information

This article is from the "Vision_g" blog, make sure to keep this source http://visiong.blog.51cto.com/10942819/1719074

Linux Learning Notes (ii) system common commands and some concepts

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.