Cygwin command (i)

Source: Internet
Author: User
Tags diff echo message

Basic Operations Command:

----------------------------------------------------------------------

----------------------------------------------------------------------

LS #以默认方式显示当前目录文件列表

Ls–a #显示所有文件包括隐藏文件

Ls–l #显示文件属性, including size, date, symbolic connection, whether readable and writable and executable

ls--color=never *.so > obj #不显示文字颜色 to record all so files into the obj file

----------------------------------------------------------------------

CD dir #切换到当前目录下的dir目录

cd/#切换到根目录

Cd.. #切换到到上一级目录

Cd.. /.. #切换到上二级目录

CD ~ #切换到用户目录, such as the root user, switch to/root

----------------------------------------------------------------------

RM File #删除某一个文件

Rm-fr dir #删除当前目录下叫dir的整个目录

----------------------------------------------------------------------

CP Source Target #将文件source copied to target

Cp/root/source. #将/root File source copied to the current directory

Cp–av Soure_dir Target_dir #将整个目录复制, the two directories are exactly the same

CP–FR Source_dir Target_dir #将整个目录复制, and is copied in a non-linked manner, when the source directory has a symbolic link, two directories are not the same

----------------------------------------------------------------------

MV Source Target #将文件source更名为target

----------------------------------------------------------------------

Diff Dir1 Dir2 #比较目录1与目录2的文件列表是否相同, but does not compare the actual contents of the file, but the differences are listed

diff file1 File2 #比较文件1与文件2的内容是否相同, if it is a text-formatted file, it will display a different content, if it is a binary code only means that two files are not the same

Comm File1 File2 #比较文件, showing two different files

----------------------------------------------------------------------

echo Message #显示一串字符

echo "Message Message2" #显示不连续的字符串

Cat

Cat file #显示文件的内容 the same as the DOS type

Cat File | More #显示文件的内容并传输到more程序实现分页显示, use the command less file to achieve the same functionality

More #分页命令, it is common to pass content to it through a pipeline, such as LS | More

----------------------------------------------------------------------

Export LC_ALL=ZH_CN. GB2312 #将环境变量LC_ALL的值设为zh_CN. GB2312

Export display=0:0 #通过该设置, graphics programs running under the current character terminal can be run directly on Xserver

Date #显示当前日期时间

Date-s 20:30:30 #设置系统时间为20:30:30

Date-s 2002-3-5 #设置系统时期为2003-3-5

Clock–r #对系统Bios中读取时间参数

Clock–w #将系统时间, such as the time set by date, is written to the BIOS

----------------------------------------------------------------------

Eject #umout掉CDROM并将光碟弹出, but CDROM cannot be in busy state, otherwise invalid

----------------------------------------------------------------------

Du #计算当前目录的容量

Du-sm/root #计算 The capacity of the/root directory and in M

Find-name/path file #在/path directory look for files

Grep-ir "chars" #在当前目录的所有文件查找字串chars, ignoring case,-I for case,-R for next level directory

----------------------------------------------------------------------

VI File #编辑文件file

VI Original BASIC use and command:

Enter the command by pressing CTRL + C, and then entering: X (exit): x! (Exit and Save): W (write to file): w! (Do not ask the way to write the file): R file (read files),:%s/oldchars/newchars/g (all Strings oldchars replaced Newchars) This type of command to operate

----------------------------------------------------------------------

Man LS #读取关于ls命令的帮助

Man ls | grep color #读取关于ls命令的帮助并通过grep程序在其中查找color字串

----------------------------------------------------------------------

StartX #运行Linux图形有环境

Xfree86 #只运行X图形server

----------------------------------------------------------------------

Reboot #重新启动计算机

Halt #关闭计算机

Init 0 #关闭所有应用程序和服务, into a pure operating environment

Init 1 #重新启动应用及服务

Init 6 #重新启动计算机

Cygwin command (i)

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.