Redhat Linux Basic Operations 2

Source: Internet
Author: User

Ls

-A # # #列出所有文件 all

-L # # #列出文件属性

-R # # #第归列出文件

-S # # #列出文件大小--size

-S # # #按大小排序列出文件

-D # # #指定目录本身 Directory


. # # #指当前目录

.. # # #当前目录的上一级目录


Normal user home directory for/home/username

Ex. Student User home directory for/home/student

Ex. Root User home directory is/root

~ # # #当前目录的家目录

~student # # #进入到student用户的家目录

CD ~ # # #进入家目录

CD ~username # # #进入某以用户家目录

CD ~student # # #进入到student用户的家目录

CD-# # #当前目录和上一次目录之间跳 (the directory in which the system was previously entered)


Mkdir-p/qq/tupian/file-p set up a directory for attribution


Touch is to create a file (why not Mkfile), when a file does not have to build it, touch, touch (open, access, modify content, modify permissions) Once, he is changed.

RM # # #移动是一个重命名的过程 (inside the same disk), in two disks called copy and delete again

Rm-r/tudou/shipin/weiwie Youku

CP # # #复制是一个新建的过程

Cp-r/tudou/shipin/weiwei Redhat

-R # # #可以第归的把源目录及其子目录下的所有文件复制过去


chmod student File # # # #改变file权限为student权限



RM-FR * Delete all files in the current directory


Yum install gcc-y # # #安装gcc

gcc fille.c-o File # # #编译fille. c Files as executables

./file # # #执行file文件


Vim FileName # # #编辑文件

I # # #是在命令行界面插入字符

ESC # # #推出命令行界面

: Wq # # #是保存退出命令行节界面


~-# # #当前目录之前所在的目录

~+ # # #当前目录

? # # #任意的但个字符

* # # #任意的所有字符

~user # # #匹配到user目录


[!ABC] equivalent to [^ABC] # # # #除了abc之外的

[ABC] # # #有a或者有b或者有c的

Touch File{a. F


Space # # #空格

PUNCT # # #特殊字符

Alnum # # #数字和字母

Alpha # # #大写和小写字母

Upper # # #大写字母

Lower # # #小写字母

Digit # # #数字

CP Fi[[:alpha:]]le test/


Man 1 passwd # # #命令帮助信息

Man 5 passwd # # #查看文件每一列的解释说明信息 (Colon delimited, description is a column file)

Man Mans

passwd # # #是文件名


find/etc/-name passwd &>file2 # # #重定向输出正确和错误的

find/etc/-name passwd >file # # #重定向输出正确的

find/etc/-name passwd 2>file1 # # #重定向输出错误




Output, CPU compute, as input, memory

CPU calculation has two kinds of results: Correct 1 and error 2, the default is output to this terminal,


> # # #重定向 (overwrite) output (overlay import)

>> # # #重定向 (append) output (append-Import)


Right will pass through the pipeline

2>&1 # # #把错误的转换成错误的 and then through the pipe


The output of a command is processed-----pipeline

Save the output of a command to a file----redirect


Show the 8th line of a file to line 10 head-n file1 | Tail-n 3 > File2

Cat-b/etc/passwd |head-10 |tail-3 >file1 # # #把一个文件的第8行到10行显示出来, and stored in a file

Multiple redirects can be used in one statement, or multiple pipe breaks can be used


This article is from the "12086672" blog, please be sure to keep this source http://12096672.blog.51cto.com/12086672/1855658

Redhat Linux Basic Operations 2

Related Article

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.