Use Linux commands on the command console in Windows

Source: Internet
Author: User

Original address: From: http://lovingtree.blog.163.com/blog/static/144853420074148293830/

Windows has powerful interfaces and many tools, but it still has a special liking for some commands in Linux. For example, tail commands for log tracking, powerful FIND commands, magic pipelines, and convenient SED and grep. These file commands are small to use, but Windows command lines are not provided, failed. Today, I need to find a keyword in a bunch of log files. I almost went crazy with Windows Search and began to miss find + xargs + grep in Linux.

Go to SourceForge and finally look back at her ...... I found the unxutils. It is a Linux Command set that can be used in windows. For details, see its home page:

Http://unxutils.sourceforge.net/UnxUtils.html

Briefly introduce the usage skills. Download the software, decompress it, and put it in any directory. For example, to c: \ tools \ unxutils, you can go to C: find all supported commands in the \ tools \ unxutils \ USR \ Local \ wbin directory.

Right-click my computer and choose Properties> advanced> environment variables"

Find the variable "path" in "system variables" and double-click it to add the c: \ tools \ unxutils \ USR \ Local \ wbin directory, in this way, you can directly call these Linux commands on the window "run" or command console.

Some commands have the same name as Windows commands. The system will give priority to Windows commands, such as the find command. At this time, you only need to change find.exeto find_.exe in % SystemRoot %/system32. However, to shield the file protection function of windows, if you change the name, Windows will automatically restore find.exe. The simplest way to avoid this is to delete find.exe under % SystemRoot %/system32/dllcache/directory.


Using tail and hitting find ***** | xargs sed ***** makes it easy ......

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.