Summary of commands commonly used under Linux

Source: Internet
Author: User
Tags echo display readable time and date

Here are just some of the usual, probably not all, welcome additions

CD Switch Directory

Cd.. Switch to upper-level directory

CD-Switch to the last directory

CD ~ Switch to user home directory

PWD View your current directory

mkdir Creating a new directory

-P If the parent directory does not exist, create it together with the parent directory

-M followed by directory permissions

RM Delete files or directories

-R Recursive Delete, and delete directory

-F Mandatory Delete no reminders

-I alerts whether to delete

RmDir Delete the directory, but in general I use Rm-r to delete the directory.


Touch to create a new file and modify the timestamp of the file

Touch File Creation File

-A only modify the file access time

-M Modify File modification time

-C If the destination file does not exist, no new files will be created. The same effect as the--no-create.

-F is not used and is reserved for compatibility with other UNIX systems.

-R uses the reference file for the same time record as the--file effect.

-D sets the time and date to use a variety of different formats.

-T sets the file's time record in the same format as the date instruction.

LS Displays files and directories in the current directory

-l display in long format

-A shows that all files are not included. ..

-a displays all files, including hidden files

-H is displayed in a readable manner

-R Recursive mode display

-R sorting in reverse view

-I displays inode information for each file

Cat View File Contents

-N Display Line number

More less View file contents

Head Tail View File contents

-n Specifies the number of rows to view

DF View disk space usage

-H is displayed in a readable manner

-M with m statistic size

-G with G statistic size

Du view file or directory size

-s lists the total size of a file or a directory

-H is displayed in a readable manner

Alias set command Alias

Alias Dir=ls

Unalias canceling command aliases

Unalias dir

CP Copy Command

-R recursive replication, and copy directory

-P retain the original permissions and properties

-F Mandatory Replication

-I pre-overwrite reminders

-U copies only when newer than the source file

MV Move or rename

Nslookup View DNS

Whether the ping test network is up to

Number of-C pings

-T set TTL value

-s Specifies the number of bytes in the ping packet, default 64 (data +icmp header) bytes

Hostname Viewing host names

Uname Viewing operating System Information

Netstat viewing ports, network connections, and other information

PS View process common combination-EFL | -aux

Pstree viewing processes in a tree-shaped structure

Top real-time view of processes and resource usage

Export Declaration Global Variables

echo Display text

FDISK view disk and operate on disk

-L View


LN creates a linked file

-S Create soft Connection file

File View Files Type

Stat View the details of a file

chmod changing file permissions

Usermod Changing user parameters

Useradd adding users

-D Specify the user's home directory

-M if the home directory does not exist, the new

-s Specifies that the user uses the shell

-g Specifies the user's group

-U specify UID for user

Chown to modify a file's genus owner group

passwd Modified Password

WC count

-L count rows

-C Statistical Character count

-W Count Count

Sort sorts

-R Reverse Order

-t split field, default space

-K sorted by number of split fields, and-T is shared

Uniq Filtering Duplicate Files

-C Displays the number of repetitions

-U displays rows that are not duplicates in the file

-D displays only duplicate rows

Find files or directories, etc.

-type type

F file

Catalog D

....

-name Name

-size size

-mtime Modify Time ...

.....

Kill kills process +pid number

Killall + process Name

TR Replacement Character

Tar packaging

Lsb_release Viewing System Information

At timed tasks

BG puts the front desk task backstage

FG put the background task to the front desk

Badblocks-s/DEV/SDA//bad path scan shows progress

Date View modified Time

History View Historical Commands

Mount Mount Storage

Umount Unloading storage

Uptime viewing run time and load conditions

Free to view memory usage

Iostat

Vmstat

Chattr +i file Lock files

Umask Setting the default permission mask

Lsof view port, process and other connection information

Route View routing Information

The awk sed command is more profound and can be learned alone.

grep filtering commands

-R Recursive filtering

-V reverse display, taking data that matches the opposite condition

-W Filter by word

-e support for regular expressions

Crontab-e Adding a timed task







This article is from "Linux rookie" blog, please be sure to keep this source http://ludihua.blog.51cto.com/4601284/1596167

Summary of commands commonly used 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.