Tuesday, June 11, 2013

Programmer's Survival Guide for Windows

2.  Windows' File System and Basic File/Directory Commands


Windows' file system is NOT case-sensitive



2.1  Drive, Pathname and Filename

To reference a file in Windows' file system, you need to provide the drive letter, the directories' name (aka pathname) and thefilename. For example, in "C:\Program Files\java\jdk1.7.0_07\bin\javac.exe", the drive is C:

2.4  Change Directory (cd) Command

To change current working directory (within the same drive), use command "cd new-path" (change directory).
It is important to take note that you need to set the current drive first (via "x:" command) before setting the current directory within the current drive.
You can specify new-path in two ways: absolute or relative. An absolute path begins with a "\" or root directory. A relative path is relative to the current working directory and does NOT begin with a leading "\". For example,
You can use ".." (double-dot) to refer to the parent directory and "." (single-dot) to refer to current directory

2.5  Directory (dir) Command

You can list the contents of the current directory via the dir command, for example,
Wildcards * and ?
You can use wildcards for pattern matching. The wildcard * matches zero or more (any) characters; ? matches one (any) character.

2.6  Shortcut Keys in CMD Shell - Important

Copy/Paste: You need to enable Copy/Paste by clicking on the CMD icon (top-left corner) ⇒ Properties ⇒ Options ⇒ Edit Options ⇒ Check "QuickEdit Mode". Once enabled, you can right-click to copy the highlighted text, and another right-click to paste on the command-line.

2.7  Other Basic Commands

Prompt> help               // Show all the available commands
Prompt> help command-name  // Show the help menu for a specific command, e.g., "help cd"
 
Prompt> cls                // Clear screen
Prompt> type filename      // Display (Type-out) the file on screen

2.8  Tips and Tweaks

  1. CMD shell is NOT case-sensitive.
  2. The screen buffer size (controlling the amount of messages retained in the screen) can be configured under "Properties" ⇒ "Layout". You should set to a bigger number (500-2000), so that you can view more old messages.

3.  Keyboard Shortcuts (for Windows)


Keyboard ShortcutFunction

ctrl+Home, ctrl+EndGoto top/end of document

shift+DownArrow, shift+UpArrowSelect lines
shift+RightArrow, shift+LeftArrowSelect characters
shift+End, shift+HomeSelect till end/begin of current line


Mouse Clicks
  1. Triple-click to select a paragraph.
done

No comments:

Post a Comment