{"id":168,"date":"2014-06-26T16:15:35","date_gmt":"2014-06-26T16:15:35","guid":{"rendered":"http:\/\/ixyzero.com\/blog\/?p=168"},"modified":"2014-06-26T16:15:35","modified_gmt":"2014-06-26T16:15:35","slug":"windows%e4%b8%8b%e7%9a%84%e5%bf%ab%e6%8d%b7%e7%9b%ae%e5%bd%95%e8%b7%b3%e8%bd%ac","status":"publish","type":"post","link":"https:\/\/ixyzero.com\/blog\/archives\/168.html","title":{"rendered":"Windows\u4e0b\u7684\u5feb\u6377\u76ee\u5f55\u8df3\u8f6c"},"content":{"rendered":"<p>\u4e0a\u4e00\u7bc7\u6587\u7ae0\u4ecb\u7ecd\u4e86Ubuntu\u73af\u5883\u4e0b\u7684\u5feb\u6377\u76ee\u5f55\u8df3\u8f6c\u529f\u80fd\uff0c\u8fd8\u89c9\u5f97\u4e0d\u8fc7\u763e\uff0c\u56e0\u4e3a\u9664\u4e86Linux\u4e0b\u6709\u547d\u4ee4\u884c\u5916\uff0c\u5728Windows\u4e0a\u6211\u4e5f\u7ecf\u5e38\u4f7f\u7528CMD\u8fdb\u884c\u67d0\u4e9b\u64cd\u4f5c\u4ee5\u63d0\u9ad8\u6548\u7387\u6216\u662f\u5fc5\u987b\u5728\u547d\u4ee4\u884c\u4e0b\u624d\u80fd\u8fdb\u884c\u7684\u64cd\u4f5c\uff0c\u5728GitHub\u4e0a\u641c\u7d22 <span style=\"color: rgb(255, 0, 0);\"><strong>jeroenhjanssens<\/strong><\/span> \u8fd9\u4e2a\u5173\u952e\u5b57\uff08\u4ed6\u662fLinux\u4e0b\u90a3\u4e2a\u5de5\u5177\u7684\u53d1\u660e\u8005\uff09\u7684\u65f6\u5019\uff0c\u78b0\u5de7\u641c\u5230\u4e86<a href=\"https:\/\/github.com\/dictoon\/marks\" target=\"_blank\">dictoon\/marks<\/a>\u4ed6\u7684\u9879\u76ee\u4ecb\u7ecd\u4e3a\uff1a<span style=\"color: #666666;\">A port of Jeroen Janssens&#8217; marks tools to Windows.<\/span><\/p>\n<p>\u5373Windows\u7248\u7684\u5feb\u6377\u76ee\u5f55\u8df3\u8f6c\u5b9e\u73b0\u3002<\/p>\n<h6>\u5b89\u88c5\uff1a<\/h6>\n<p>\u5728GitHub\u4e0a\u4e0b\u8f7d\u8be5\u9879\u76ee\u7684\u6240\u6709\u6587\u4ef6\uff0c\u53ef\u4ee5\u53ea\u5c06\u00a0j.bat \/ m.bat \/ marks.bat \/ unmark.bat \u8fd94\u4e2a\u6279\u5904\u7406\u6587\u4ef6\u653e\u5728\u4e00\u4e2a\u4f60\u89c9\u5f97\u5408\u9002\u7684\u5730\u65b9\uff0c\u7136\u540e\u8bb0\u5f97\u5c06\u8be5\u8def\u5f84\u6dfb\u52a0\u81f3\u7cfb\u7edf\u8def\u5f84\u4e2d\uff0c\u5728\u4f60\u4f7f\u7528\u7684\u65f6\u5019\uff0c\u5b83\u4f1a\u5728\u4f60\u5b58\u653e\u7684\u76ee\u5f55\u4e0b\u65b0\u5efa\u4e00\u4e2a\u53eb\u505amark\u7684\u5b50\u76ee\u5f55\u7528\u4e8e\u5b58\u653e\u540e\u7f00\u4e3a.mark\u7684\u6587\u4ef6\uff0c\u6587\u4ef6\u5185\u5bb9\u5176\u5b9e\u5c31\u662f\u6807\u8bb0\u7684\u8def\u5f84\u3002<\/p>\n<h6>\u4f7f\u7528\u65b9\u6cd5\uff1a<\/h6>\n<pre class=\"lang:default decode:true\">m &lt;name&gt;\u00a0 \u00a0 #\u00a0to create a named shortcut to the current directory. Example: m docs\nj &lt;name&gt;\u00a0 \u00a0 #\u00a0to follow a given shortcut. Example: j docs\nunmark &lt;name&gt;\u00a0 #\u00a0to delete a given shortcut. Example: unmark docs\nmarks\u00a0 \u00a0 \u00a0 \u00a0#\u00a0to print all available shortcuts.<\/pre>\n<h6>\u4f7f\u7528\u793a\u4f8b\uff1a<\/h6>\n<pre class=\"lang:default decode:true\">C:Windows&gt; mark win\n\nC:Windows&gt; marks\nwin -&gt; C:Windows\n\nC:Windows&gt; cd ..\n\nC:&gt; jump win\n\nC:Windows&gt;<\/pre>\n<h6>\u6700\u540e\uff0c\u6211\u4e00\u822c\u662f\u7528\u7684\u5feb\u6377\u65b9\u5f0f\u6709\uff1a<\/h6>\n<ul>\n<li>hosts -&gt; C:WindowsSystem32driversetc<\/li>\n<li>php55 -&gt; C:php-5.5.9-Win32-VC11-x64<\/li>\n<li>py27 -&gt; C:Python27Scripts<\/li>\n<li>py34 -&gt; C:Python34Scripts<\/li>\n<\/ul>\n<p>&#8212;&#8212;&#8212;-<\/p>\n<h5>\u8fd9\u91cc\u9762\u6d89\u53ca\u5230\u76844\u4e2a\u6279\u5904\u7406\u811a\u672c\uff1a<\/h5>\n<h6>m.bat\uff08\u4e3a\u5f53\u524d\u76ee\u5f55\u521b\u5efashortcut\uff09<\/h6>\n<pre class=\"lang:batch decode:true \" title=\"\u521b\u5efa\u6807\u8bb0{\u5229\u7528\u4e86Windows\u4e0b\u547d\u4ee4\u884c\u5b57\u7b26\u4e32\u7684\u622a\u53d6\u7b49\u7279\u6027}\">@echo off\nif (\"%~1\") == (\"\") echo Please specify mark name.&amp;&amp;exit \/b 1\nfor \/f \"delims=*+,\/:;&lt;=&gt;?[]|\" %%a in (\"%~1\") do if not (\"%%~a\") == (\"%~1\") echo Please do not use special characters in the mark name.&amp;&amp;exit \/b 1\nif not exist \"%~dp0marks\" mkdir \"%~dp0marks\"\necho %CD%&gt;\"%~dp0marks%~1.mark\"<\/pre>\n<h6>j.bat\uff08\u8df3\u8f6c\u81f3\u6307\u5b9a\u7684shortcut\u4ee3\u8868\u7684\u76ee\u5f55\uff09<\/h6>\n<pre class=\"lang:batch decode:true \" title=\"\u5229\u7528\u4e4b\u524d\u7684\u6807\u8bb0\u8fdb\u884c\u8df3\u8f6c\u7684batch\u811a\u672c\">@echo off\nif (\"%~1\") == (\"\") echo Please specify mark name.&amp;&amp;exit \/b 1\nfor \/f \"delims=*+,\/:;&lt;=&gt;?[]|\" %%a in (\"%~1\") do if not (\"%%~a\") == (\"%~1\") echo Please do not use special characters in the mark name.&amp;&amp;exit \/b 1\nif not exist \"%~dp0marks%~1.mark\" echo Mark does not exist: %~1&amp;&amp;exit \/b 1\nfor \/F \"usebackq delims=\" %%i in (\"%~dp0marks%~1.mark\") do if exist \"%%i\" (%%~di &amp;&amp; cd \"%%i\") else (echo Jump destination does not exist: %%i)<\/pre>\n<h6>marks.bat\uff08\u663e\u793a\u6240\u6709\u5df2\u521b\u5efa\u7684shortcuts\uff09<\/h6>\n<pre class=\"lang:batch decode:true \">@echo off\nif not exist \"%~dp0marks*.mark\" echo No marks exist.&amp;&amp;exit \/b 1\nfor \/f \"delims=\" %%f in ('dir \/b \"%~dp0marks*.mark\"') do (for \/F \"usebackq delims=\" %%i in (\"%~dp0marks%%f\") do echo %%~nf -^&gt; %%i)<\/pre>\n<h6>umark.bat\uff08\u89e3\u9664\u6307\u5b9ashortcut\uff09<\/h6>\n<pre class=\"lang:batch decode:true \">@echo off\nif (\"%~1\") == (\"\") echo Please specify mark name.&amp;&amp;exit \/b 1\nfor \/f \"delims=*+,\/:;&lt;=&gt;?[]|\" %%a in (\"%~1\") do if not (\"%%~a\") == (\"%~1\") echo Please do not use special characters in the mark name.&amp;&amp;exit \/b 1\nif not exist \"%~dp0marks%~1.mark\" echo No mark exists with name: %~1&amp;&amp;exit \/b 1\ndel \"%~dp0marks%~1.mark\"<\/pre>\n<p>\u5176\u5b9e\u53ef\u4ee5\u4ece\u8fd9\u51e0\u4e2abatch\u811a\u672c\u4e2d\u5b66\u5230\u5f88\u591a\u5b9e\u7528\u7684Windows\u547d\u4ee4\u884c\u4e0b\u7684\u5b57\u7b26\u4e32\u5904\u7406\u6280\u5de7\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0a\u4e00\u7bc7\u6587\u7ae0\u4ecb\u7ecd\u4e86Ubuntu\u73af\u5883\u4e0b\u7684\u5feb\u6377\u76ee\u5f55\u8df3\u8f6c\u529f\u80fd\uff0c\u8fd8\u89c9\u5f97\u4e0d\u8fc7\u763e\uff0c\u56e0\u4e3a\u9664\u4e86Linux\u4e0b\u6709\u547d\u4ee4\u884c\u5916\uff0c\u5728Wind [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,20],"tags":[97,95,50],"class_list":["post-168","post","type-post","status-publish","format-standard","hentry","category-tools","category-windows","tag-bat","tag-cd","tag-scripts"],"views":2509,"_links":{"self":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/168","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/comments?post=168"}],"version-history":[{"count":0,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/168\/revisions"}],"wp:attachment":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/media?parent=168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/categories?post=168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/tags?post=168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}