請選擇 進入手機版 | 繼續訪問電腦版
搜索
熱搜: 活動 交友 discuz
查看: 3375|回復: 0

[Windwos] [DOS]命令提是字元(cmd) - Doskey教學 | alias指令名稱更換(模擬Linux)

[複製鏈接]
發表於 2014-2-25 16:53:49 | 顯示全部樓層 |閱讀模式
詳細的Doskey文件可以參考以下內容或官方文件,我這裡就先講alias(別名修改)基本用法:

  1. doskey ls=dir
複製代碼
以上這行就是教學範例,讓日後 ls 的指令對應 dir。

  1. doskey /marcos
複製代碼
查看alias,顯示已經取名的命令列表。

最後,要刪除的話,就用 Alt + F10。

以上~教完了!



Microsoft官方文件:http://www.microsoft.com/resourc ... oskey.mspx?mfr=true

Syntax

doskey {/reinstall | /listsize=size | /macros:[{all | exename}] | /history | /insert | /overstrike | /exename=exename | /macrofile=FileName | macroname=[text]}



Parameters

Parameters

/reinstall Installs a new copy of Doskey.exe. Clears the command history buffer.

/listsize=size Specifies the maximum number of commands in the history buffer.

/macros Displays a list of all doskey macros. You can use a redirection symbol (>) with /macros to redirect the list to a file. You can abbreviate /macros to/m.

all Displays doskey macros for all executables.

exename Displays doskey macros for the specified executable.

/history Displays all commands stored in memory. You can use a redirection symbol (>) with /history to redirect the list to a file. You can abbreviate /historyas /h.

{/insert | /overstrikeSpecifies whether new text you type is to replace old text. If you use /insert, new text that you type on a line is inserted into old text (that is, as if you pressed the INSERT key). If you use /overstrike, new text replaces old text. The default setting is /overstrike.

/exename=exename Specifies the program (that is, executable) in which the doskey macro runs.

/macrofile=FileName Specifies a file containing macros that you want to install.

macroname=[textCreates a macro that carries out the commands specified by textMacroname specifies the name you want to assign to the macro. Textspecifies the commands you want to record. If text is left blank, macroname is cleared of any assigned commands.

/? Displays help at the command prompt.




Remarks

The following table lists doskey editing keys and their functions.

Key or key combinationDescription

LEFT ARROW

Moves the insertion point back one character.

RIGHT ARROW

Moves the insertion point forward one character.

CTRL+LEFT ARROW

Moves the insertion point back one word.

CTRL+RIGHT ARROW

Moves the insertion point forward one word.

HOME

Moves the insertion point to the beginning of the line.

END

Moves the insertion point to the end of the line.

ESC

Clears the command from the display.

F1

Copies one character from the same column in the template to the same column in the Command Prompt window. (The template is a memory buffer that holds the last command you typed.)

F2

Searches forward in the template for the next key you type after pressing F2. Doskey.exe inserts the text from the template up to, but not including, the character you specify.

F3

Copies the remainder of the template to the command line. Doskey.exe begins copying characters from the position in the template that corresponds to the position indicated by the insertion point on the command line.

F4

Deletes characters from the current insertion point position up to a character you specify. To use this editing key, press F4 and type a character. Doskey.exe deletes the characters from the current insertion point position to the first letter specified.

F5

Copies the template into the current command line.

F6

Places an end-of-file character (that is, CTRL+Z) at the current insertion point position.

F7

Displays all commands for this program stored in memory in a pop-up box. Use the UP ARROW key and the DOWN ARROW key to select the command you want, and press ENTER to run the command. You can also note the sequential number in front of the command and use this number in conjunction with the F9 key.

ALT+F7

Deletes all commands stored in memory for the current history buffer.

F8

Displays all commands in the history buffer that start with the characters in the current command.

F9

Prompts you for a history buffer command number, then displays the command associated with the number you specify. Press ENTER to run the command. To display all the numbers and their associated commands, press F7.

ALT+F10

Deletes all macro definitions.


您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

本論壇為非營利之網路平台,所有文章內容均為網友自行發表,不代表論壇立場!若涉及侵權、違法等情事,請告知版主處理。


Page Rank Check

廣告刊登  |   交換連結  |   贊助我們  |   服務條款  |   免責聲明  |   客服中心  |   中央分站

手機版|中央論壇

GMT+8, 2019-11-12 03:59 , Processed in 0.091939 second(s), 17 queries .

Powered by Discuz!

© 2005-2015 Copyrights. Set by YIDAS

快速回復 返回頂部 返回列表