Basic instructions under Linux.

Source: Internet
Author: User
Tags create directory gz file

What do you see in a directory (folder)? ------------ls-l

Where is it? -----------------pwd

Change Path-----------------CD

Create directory-----------------mkdir

Delete directory-----------------Rfdir can only delete empty directories

RM can delete files and directories at the same time

Man Help file

1. User commands

2, system invoke the pretext API

3. C library function

4, System equipment related

5. Configuration Files

6. Game Manual

7. A Theme

8. System Management Commands

Q exit

J Flip Down screen

K up

/Find

N Next

N Previous

Time-----------------------date+% formatted output

Time, time stamp +%s

Timestamp, time date–d @ timestamp + "%F%T"

Calendar-----------------------cal

Calculator--------------------BC

View disk space-------------DF

View Memory------------------Free

View process

Shutdown

Restart

Permissions

Edit Text

Installing the Software

More split screen display

Space to turn down one screen

b Turn up one screen

Q exit

Output Redirect: Change the output direction

Implementation mode: >filename

Ls–la ~ >tmp

>> Append output redirection

More TMP

Piping: FIFO non-reversible symbol: |

Cut gets the columns of the file

-D-Broken symbols

-F What columns to take Start-end,col

Sort by

-T column symbol

-K sorted Columns

-N Sorts by numeric size, default is ASCII

Du view the size of the files in the directory

Uniq to remove adjacent duplicate rows

WC statistics File Rows-L Word number-W characters-C

Find file: Find path –name "XXX" such as "*.h"

Find content in a file: grep "filtered content" filename

Find path –name "*.C" | Xargs grep "function" (grep for each item in the pipeline)

Package files TAR–CVF file name (not compressed)

Unpacking files TAR–XVF file name

tar.gz file: Compressed TAR–CZVF file name (compressed to GZ file)

Unzip TAR–XZVF file name

tar.bz2 files: compressing tar–cjvf file names

Unzip TAR–XJVF file name

File: View files Type

CTRL + C: End Process

Ctrl+d:eof (file End flag)

Shutdown: Shutdown–h time (how long after shutdown)

Init 0 Shutdown

1 Password-free administrator mode start

2 Open service, no network

3 Open Network services on a 2 basis

4 reserved

5 The default is to turn on the graphical interface

6 restart

TTY View current terminal

Types of files under Linux

1.-Normal file

2. D Catalog File

3, p pipeline file

4, B Block equipment files

5. C Character device file

s socket file

Command substitution: ' (number 1 left key)

Hard link: ln source filename New file name (for backup of important files)

Soft Connect: ln–s source filename New file name (equivalent to shortcut)

Readlink: View the contents of the soft connection itself

Permissions------r/w/x (/s/t) (read/write/execute/user set bit/sticky bit) Note that the T permission must be valid with X permission, otherwise invalid, displayed as T

R W-r--R--

Owner This group of users other users

chmod permission file name (change permissions)

U Master User

Group G users

o Other users +-= add or subtract replacement r/w/x

A All Users

Umask viewing or modifying file permissions

Mask & ~umask

Permissions for the Directory

1, R-ls

2, X-CD

3, W-touch

Basic instructions under Linux.

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.