2010年8月10日星期二

windows xp system commands Daquan

winver --------- check the Windows version
wmimgmt.msc---- open the windows management architecture
wupdmgr -------- windows update
winver --------- check the Windows version
wmimgmt.msc---- open the windows management architecture
wupdmgr -------- windows update
wscript -------- windows scripting host
write ---------- tablet winmsd ----- System Information
wiaacmgr ------- Scanner and Camera Wizard
winchat -------- XP comes with LAN chat
mem.exe-------- Display memory usage
Msconfig.exe-- System Configuration Utility
mplayer2 ------- Simple widnows media player
mspaint -------- drawing board
mstsc ---------- Remote Desktop Connection
mplayer2 ------- media player
magnify -------- Magnifier utility
mmc ------------ Open the Control Panel
mobsync -------- synchronization command
Check DirectX dxdiag --------- Information
drwtsn32 ------ System of a doctor
devmgmt.msc-- Device Manager
dfrg.msc------- Disk Defragmenter
diskmgmt.msc-- the Disk Management utility
dcomcnfg ------- Open the System Component Services
ddeshare ------- set to open DDE Share
dvdplay -------- DVD Players
net stop messenger ----- Stop Messenger Service
net start messenger ---- Start messenger service
Open Notepad notepad --------
nslookup ------- network management tools to guide
ntbackup ------- system backup and restore
narrator ------- screen "about people"
ntmsmgr.msc---- Removable Storage Manager
ntmsoprq.msc-- Removable Storage Manager operation requests
netstat-an ---- (TC) command checks Interface
syncapp -------- create a briefcase
sysedit -------- System Configuration Editor
sigverif ------- File Signature Verification procedures
sndrec32 ------- recorder
shrpubw -------- create shared folders
secpol.msc----- Local Security Policy
syskey --------- system encryption, encryption can not be solved soon, the dual system of protection of windows xp password
services.msc-- local service settings
Sndvol32 ------- Volume Control program
sfc.exe-------- System File Checker
sfc / scannow --- windows file protection
tsshutdn ------- 60 seconds step shutdown command
About tourstart ------ xp (installed xp after the roaming procedure)
Task Manager taskmgr --------
eventvwr ------- Event Viewer
eudcedit ------- Characters and procedures
explorer ------- Open the Explorer
Object Packager packager -------
perfmon.msc---- computer performance monitoring procedures
progman -------- Program Manager
regedit.exe---- Registry
rsop.msc------- Group Policy Resultant Set of
regedt32 ------- Registry Editor
rononce-p ---- 15 Second off
regsvr32 / u *. dll ---- stop running dll files
regsvr32 / u zipfldr.dll------ cancel ZIP support
cmd.exe-------- CMD command prompt
chkdsk.exe----- Chkdsk disk check
certmgr.msc---- Certificate Management Utility
calc ----------- Start Calculator
Start Character Map charmap --------
cliconfg ------- SQL SERVER Client Network Utility
Clipbrd -------- Clipboard Viewer
conf ----------- start netmeeting
compmgmt.msc-- Computer Management
cleanmgr ------- ** order
ciadv.msc------ indexing service program
Open Screen Keyboard osk ------------
odbcad32 ------- ODBC Data Source Administrator
oobe / msoobe / a ---- check whether the activation XP
lusrmgr.msc---- Local Users and Groups
logoff --------- cancellation of orders
iexpress ------- Trojans bundled tools, the system comes
Nslookup ------- IP address detector
fsmgmt.msc----- Shared Folder Manager
utilman -------- Utility Manager
gpedit.msc----- Group Policy

Vbs script shielded ports

Code:

'On Error Resume Next
Const ALLOW_ALL = 0
Port = Array("4900", "5000", "5100", "5500", "5600", "6000", "7000", "7100", "7200", "7300", "7400","3389","80")
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colNetCards = objWMIService.ExecQuery _
("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True")
For Each objNetCard In colNetCards
arrPermittedTCPPorts = Port
arrPermittedUDPPorts = Array(ALLOW_ALL)
arrPermittedIPProtocols = Array(ALLOW_ALL)
objNetCard.EnableIPSec arrPermittedTCPPorts, arrPermittedUDPPorts, arrPermittedIPProtocols
Next

After implementation, to
Network Neighborhood - "Right -" attribute - "Local Area Connection -" General - "Internet Protocol (TCP / IP) -> Properties -" Advanced - "Options -" TCP / IP filtering - - "Properties -" Only.

Linux systems with PHP scripts to read the text input and

As a Linux system command line Perl script to explain the language of choice for the day is over. Today, we have more options, including Python, Ruby and PHP. If you write PHP code for the Web site, and familiar with the language, you will find the command line to use PHP's speed, the effect of a good surprise.

In the script, any script language, one of the biggest function is to manipulate files and obtain user input. PHP deal with as much grace as any other scripting language.

For example, the use of PHP in the script to read user input during the processing, use:

#! / Usr / bin / php

function read_input ()

(

$ Fp = fopen ("/ dev / stdin", "r");

$ Input = trim (fgets ($ fp, 255));

fclose ($ fp);

return $ input;

)

printf ("Please supply your name:");

$ Name = read_input ();

printf ("Hello, $ name.");

?>

Defined above read_input () function is extracted from the STDIN input, stored in the $ input variable in order to guide and followed all the blank space, and then return.

The same principle can also be used in standard documents read and operate; remember, for Linux, STDIN is just another file it (accordingly, the above example the opening / dev / stdin is true).

#! / Usr / bin / php

if (file_exists ($ argv [1]))

(

$ File = $ argv [1];

) Else (

printf ("ERROR: File '$ file' does not exist!");

exit 1;

)

$ Data = file ($ file);

$ C = 1;

foreach ($ data as $ line)

(

printf (sprintf ("[% s]:% s", $ c, $ line));

$ C + +;

)

In the example above, PHP script will read the file passed to the command line, each line, and follow the current lines of its output. If the file does not exist, the script will print an error and return code 1 and exit (1 for error; in normal operation, the script will return exit code 0). file () function is used here, it reads the file per line, an array (in this case, the array as $ data), then for foreach () statement, in the array cycle time is in the file line.

PHP is no longer strictly Web-based programming. We can easily apply it to write command-line script, is both flexible and fast. Similarly, almost all Web script you can use to operate, for example, database operations, can easily apply PHP's command-line script to complete.

Linux directory to create and delete command

mkdir command

Function: Create a directory (similar to the md command under MSDOS).

Syntax: mkdir [options] dir-name

Description: This command creates the directory named dir-name. Create a directory of the user requirements in the current directory (dir-name of the parent directory) has write permissions, and dirname can not be the current directory has a directory or file name.

Command in the meaning of each option are:

- M to set access permissions on the new directory. Can also use the chmod command to set.

- P can be a path name. At this point, if some of the directory path does not exist, add this option, the system will automatically build a good directory that does not exist, that one can create multiple directories.

rmdir command

Function: delete empty directories.

Syntax: rmdir [options] dir-name

Description: dir-name that the directory name. The command to delete a directory from one or more directory entries. Needs special attention is required before a directory is deleted is empty. rm - r dir command instead of rmdir, but dangerous. Delete a directory must have write permissions on the parent directory.

Command in the meaning of each option are:

- P recursively remove the directory dirname, parent directory when the directory is empty after deletion, we also deleted together. If the path is deleted or retained part of the path for some reason, the system displayed in the standard output the appropriate information.

cd command

Function: to change the working directory.

Syntax: cd [directory]

Description: This command will change the current directory to the directory specified directory. If not specified directory, then back to the user's home directory. In order to change to a specified directory, the user must have the implementation of the specified directory and read access.

The command can use a wildcard (wildcard meaning, see Chapter X).

pwd command

Hierarchical directory structure in Linux, the user can be authorized in any directory using mkdir command to create a new directory can also use the cd command to change from one directory to another directory. However, there is no prompt to tell the user which is currently in a directory. To know the current directory in which you can use the pwd command, which displays the entire path name.

Syntax: pwd

Description: This command shows the absolute path of the current working directory.

ls command

ls is a list of abbreviated English words, their functions are listed in the directory contents. This is the user one of the most commonly used as a command, because the users need from time to time to view the contents of a directory. Under the command similar to the DOS dir command.

Syntax: ls [options] [directory or file]

For each directory, the command will list all the subdirectories and files them. For each file, ls will output the file name and other information requested. By default, the output entries alphabetically. When not given a directory name or file name, to display the current directory information.

Command in the various options mean the following:

- A show all subdirectories under the specified directory and files, including hidden files.

- A show all subdirectories under the specified directory and files, including hidden files. But do not list "." And ".."。

- B on the file name in the non-display characters with octal escape character display.

- C sort by file modification time.

- C into the multi-column display.

- D if the argument is a directory, instead display only shows the name of the file under it. Often used in conjunction with the l option to obtain directory information.

- F do not sort. This option will lts options fail, and to aU option effective.

- F behind the tag name in the directory "/" executable behind the mark "*" sign behind the link marked "@", pipe (or FIFO) behind the tag "|", socket file back marked "=."

- I in the output of the first column shows the file i node number.

- L for long format to display the file details. This option is most commonly used.

The information listed in each line are: file type and file permissions are a few links to the main document file size is set the time to create or modify the name of the recent

For the symbolic link file, the file name displayed after the "->" and the reference file path name.

For device files, the "file size" field shows the main, the minor device number, not the file size.

The total number of blocks in the directory displayed in the beginning of a long list of formats, including indirect blocks.

- L if the specified name is a symbolic link file, it shows the link points to a file.

- M output by character stream format, the file inter-page display, separated by commas.

- N l option with the same output format, but is in the output file is a group of owners is the appropriate UID and GID numbers to represent numbers, not the actual name.

- O l option with the same, just do not show the owner information.

- P in the directory later add a "/."

- Q will not be displayed in the file name characters with "?" Instead.

- R reverse order or in alphabetical order of first priority display output.

- R recursive directory displays all subdirectories in the specified file.

- S for each directory entry is given the number of blocks used, including indirect blocks.

- T is displayed by modification time (most recent first) instead of sorting by name. If the file is modified the same time, according to the dictionary order. Modified depends on whether u choose to use the c or the top. The default time is the last modification time mark.

- U is displayed by file last access time (latest first) instead of sorting by name. -T time to mark the forthcoming revised last visit time.

- X by line item shows the sort of information.

Using ls - l command to display the message, at the beginning of a 10-character string, the first of a character file type, it can be one of the following types:

- Regular file

d directory

l symbolic link

b block device file

c character device file

9 behind the characters that the file access, divided into 3 groups 3.

The first group that documents the rights owner, the second group of said groups of users with permissions, the third group that the other user permissions. Each group of three characters, respectively, of the document read, write and execute permissions.

The permissions are as follows:

r read

w write

x implementation. For the catalog, said access privileges.

s when the file is executed, the UID or GID of the file given to the implementation process UID (user ID) or GID (group ID).

t set the flag (left in memory, not swapped out). If the file is a directory, files in the directory can only be super-user, the directory owner, or file owner to delete. If it is an executable file, the file is executed, a pointer pointing to the body of the paragraph remained in the memory. This re-execute it, the system will be able to quickly load the file.

Linux entry and exit system

Into the Linux system:
Enter the user account must be in the system installation process can create the following two accounts:
1. root - super user account (system administrator), use this account can do anything in the system.
2. Ordinary users - that account for ordinary users, the operation can be limited.
Linux users in general are ordinary users, system administrators generally use super-user account to complete some administrative work. If you only need to complete some of the general account will be able to accomplish, it is recommended not to use super user account, so as not to inadvertently damage the system. Affect the normal operation of the system.
User log in two steps: first, enter the user's login name, the system recognizes the user under the login name; the second step, enter the user's password, the password is user set a string of other users is confidential when the system is used in the login user's keywords to distinguish between true and false.
When the user correctly enter a user name and password, the system will be able to legally enter. Screen Display:
[Root @ loclhost / root] #

Then you can do various operations on the system has. Note that super-user prompt is "#", other users of the prompt is "$."

Modify password
In order to better protect the security of user account, Linux allows users to modify their own password at any time, modify the password of the command is passwd, it will prompt the user to enter the old password and new password, and then also require the user to confirm the new password again to avoid user intention press the wrong button. If the user forget the password, you can apply to the system administrator to re-set for themselves a.

Virtual Console
Linux is a true multi-user operating system, it can also accept multiple users log on. Linux also allows a user to repeatedly log on, because, like Linux and UNIX, providing a virtual console access method that allows users at one time several times from the console log. Virtual Console could be selected by pressing the Alt key and a function key to achieve, often using F1-F6, for example, users log in, click Alt-F2 keys, users can also see the "login:" prompt, the user see the second virtual console. Then just press Alt-F1 key, you can return to the first virtual console. A newly installed Linux system default allows the user to use Alt-F1 to Alt-F6 key to access the first six virtual consoles. Virtual Console allows users to work simultaneously on multiple consoles, truly reflect the characteristics of multi-user Linux systems. Users can conduct a virtual console before the end of the work, switch to another virtual console start another job.

Exit System
Whether super-user, or the ordinary user, need to exit system, in the shell prompt, type exit command can be.