How to use linux commands in windows

Source: Internet
Author: User

However, cygwin is too complex and requires a lot of resources to download. In the end, I didn't download it, nor did I use it. In my opinion, GunWin32 is a good choice. GnuWin32 enables windows users to use a variety of linux commands in the command line window, which is as simple as using common windows commands.

1. Download The gnuwin32,gnuwin32installation file (getgnuwin32-0.6.3.exe): Example/
2.run getgnuwin32-0.6.3.exe and specify the installation directory.
3.enter the getgnuwin32subdirectory of the installation directory. The getgnuwin32subdirectory is automatically created by getgnuwin32-0.6.3.exe.
4. Run download. bat. This process will download all linux Command programs from the network, so it takes a long time for everyone to go out and make soy sauce or something.
5. Run install. bat. After installation, you can start using various linux commands.

Command usage:
1. find + grep find the specified file: find D: \ * | grep. xml

2. type/cat + grep: cat test.txt | grep KEY2 or type test.txt | grep KEY2

3. sed: cat test.txt | sed "s/\ [KEY2 \] //"

4. iconv conversion file encoding: iconv-f gbk-t UTF-8 top management in history. txt> top management in history.

5. jpeg to pnm: jpegtopnm cat_type_grep.jpg> cat_type_grep.jpg.pnm

6. Convert the image format from pnm to png: pnmtopng cat_type_grep.jpg.pnm> cat_type_grep.png

7. Convert the image format jpeg to png: jpegtopnm cat_type_grep.jpg | pnmtopng> cat_type_grep.png

8. batch conversion of images: for/r. \ % I in (*. jpg) do topics topnm % I | pnmtopng> % ~ Ni.png

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.