Common Linux Commands

Source: Internet
Author: User
Tags uncompress

Objective
The future work environment will become Linux, also need to understand the Linux command, and then the other Linux-related operations to learn again.

Business
Linux Common commands
1. Instructions for displaying dates: date
Formatted output:
Date + "%y-%m-%d"
2015-07-31

2、显示日历的指令:cal    单独执行cal命令会打印出日历3、简单好用的计算器:bc    echo "sqrt(100)" | bc    输出104、重要的几个热键[Tab],[ctrl]-c, [ctrl]-d

[Tab] button-with "command completion" not "file full" function
[Ctrl]-c button-Let the current program "Stop"
[ctrl]-d button-usually represents: "Keyboard input ends (end of File, EOF end ofinput)" meaning; In addition, he can be used to replace exit

5、改变文件拥有者:chown    将目录/usr/dan及其下面的所有文件、子目录的文件主改成 dan:    chown -R dan /usr/dan6、改变文件的权限:chmod    chown user:market f01  //把文件f01给uesr,添加到market组7、显示当前所在目录:pwd8、建立新目录:mkdir9、由第一行开始显示档案内容:cat10、一页一页的显示档案内容:more    按Space键:显示文本的下一屏内容。     按Enier键:只显示文本的下一行内容。     按斜线符|:接着输入一个模式,可以在文本中寻找下一个相匹配的模式。    按H键:显示帮助屏,该屏上有相关的帮助信息。     按B键:显示上一屏内容。    按Q键:退出rnore命令。11、只看头几行:head12、只看尾几行:tail13、修改档案时间或新建档案:touch14、观察文件类型:file15、寻找特定档案:whereis\locate\find    [[email protected] ~]# whereis svn     svn: /usr/bin/svn /usr/local/svn             /usr/share/man/man1/svn.1.gz    搜索etc目录下所有以sh开头的文件:    locate /etc/sh    在/home目录下查找以.txt结尾的文件名


Find/home-name "*.txt"

16、压缩文件和读取压缩文件:compress\uncompress,gzip\zcat,bzip2\bzcat,tar    常见的Linux压缩文件扩展名    *.Z            compress压缩的文件(已经被gzip替代)    *.gz          gzip程序压缩的文件    *.bz2        bzip2程序压缩的文件(比gzip效果好,但只能针对一个文件来压缩)    *.tar          tar程序打包的数据,没有压缩(使用tar打包成一个文件,可以解决bzip2不能压缩多个文件的问题)    *.tar.gz     tar程序打包的数据,并经过gzip的压缩    *.tar.bz2   tar程序打包的数据,并经过bzip2的压缩    压缩        compress [-rcv]  文件名或目录名    解压缩    uncompress  文件名.z    gzip可以解开compress,zip和gzip压缩的文件,压缩文件扩展名为gz    gzip  [-cdtv#]  文件名或目录名    zcat  文件名.gz     不用解压缩在屏幕上输出压缩文件的内容    bzip2  [-cdkzv#]  文件名    bzcat  文件名.bz2    打包与压缩:tar  [-j|-z]  [cv]  [-f  文件名]      查看文件:    tar  [-j|-z]  [tv]   [-f  文件名]    解压缩:        tar  [-j|-z]  [xv]  [-f  文件名]  [-c  目录]

PS: More commands please see the linux command Daquan URL http://man.linuxde.net/

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Common Linux 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.