惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Microsoft Azure Blog
Microsoft Azure Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Webroot Blog
Webroot Blog
腾讯CDC
The Last Watchdog
The Last Watchdog
博客园 - 司徒正美
H
Hacker News: Front Page
I
InfoQ
A
Arctic Wolf
H
Hackread – Cybersecurity News, Data Breaches, AI and More
H
Heimdal Security Blog
L
LINUX DO - 最新话题
T
Threat Research - Cisco Blogs
宝玉的分享
宝玉的分享
Last Week in AI
Last Week in AI
Security Latest
Security Latest
D
DataBreaches.Net
C
Check Point Blog
J
Java Code Geeks
www.infosecurity-magazine.com
www.infosecurity-magazine.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Attack and Defense Labs
Attack and Defense Labs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
L
Lohrmann on Cybersecurity
雷峰网
雷峰网
Vercel News
Vercel News
WordPress大学
WordPress大学
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Spread Privacy
Spread Privacy
Forbes - Security
Forbes - Security
阮一峰的网络日志
阮一峰的网络日志
Hacker News: Ask HN
Hacker News: Ask HN
大猫的无限游戏
大猫的无限游戏
I
Intezer
N
News and Events Feed by Topic
小众软件
小众软件
B
Blog RSS Feed
Help Net Security
Help Net Security
Google DeepMind News
Google DeepMind News
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 三生石上(FineUI控件)
S
Security @ Cisco Blogs
美团技术团队
Recent Announcements
Recent Announcements
Martin Fowler
Martin Fowler
Engineering at Meta
Engineering at Meta
The GitHub Blog
The GitHub Blog
MyScale Blog
MyScale Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main

博客园 - 观无明

IE9 + django开发版WEB服务器 不响应或Socket报错 google chrome 下django用户登录失败的问题 django 开发多语言网站 不愁男女比例不协调 Word文件如源码一样也可比较和合并 python 的字符编码和中文处理 - 观无明 - 博客园 djang 测试心得 my django development environment (virtualenv+pip+django) nginx+fastcgi+django实践笔记 django 开发 - 小心模板文件的编码格式(utf-8) 汉王电子书D20使用笔记 使用south实现Django的数据库升级迁移 VIM 笔记 (for python ) 仍有人在真心关注这灾难 CruiseControl中应用NCover和NCoverExplore CruiseControl中使用NUnit中测试WEB服务 Resharper封装(Encapsulate)域Field为属性Property的命名问题 数据库开发的持续集成 - CruiseControl.Net的项目配置 数据库开发的持续集成 - Liquibase的简介和应用
在Windows上使用Linux命令 cygwin
观无明 · 2010-04-21 · via 博客园 - 观无明

Technorati 标签: windows,linux,命令

喜欢Linux上的命令行工具,如grep, tail, 想要在Windows上使用他们,可以通过cygwin,mingw实现我的愿望。但有时嫌他们有点重,最好是有移植到Windows平台上的命令,幸好被我找到一个:http://unxutils.sourceforge.net/

下载下来,解压后,把解压后的目录设在windows的系统路径中(我的电脑 > 右键属性 >  高级 > 环境变量 > 系统变量 > Path ),就OK了。

还有一个问题困扰我,如果用mkdir,rmdir等命令,你会发现还是Windows自带的mkdir被执行,试了几个办法要解决它:

  1. 路径设置时,把解压后的目录设在system32之前,如 Path=D:\software\unixOnwin32;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOW…
  2. 把mkdir等命令拷贝到system32里,想要覆盖Windows自带的mkdir

这两个办法都失败了,在拷贝时居然发现system32没有mkdir,rmdir等命令的可执行程序,咋回事啊? 因为大部份基础的命令都在cmd.exe中实现,而非按照路径搜寻外部命令,包括cd, del,dir, mkdir,rd等等。

无奈,如果必须要用Linux版的mkdir,则需开启cygwin了。

Cygwin

目录上右键打开控制台

c:\cygwin\bin\bash --login -c "cd '%1'; exec bash --rcfile ~/.bashrc"

让ls列出的文件彩色显示

编辑 $HOME/.bashrc

alias ls='ls -hF --color=tty'                 # classify files in colour
alias dir='ls --color=auto --format=vertical'