1. Lệnh Ping : Cú pháp: Code: ping ip/host [/t][/a][/l][/n]



tải về 1.67 Mb.
Chế độ xem pdf
trang86/92
Chuyển đổi dữ liệu18.05.2022
Kích1.67 Mb.
#52014
1   ...   82   83   84   85   86   87   88   89   ...   92
Cac lenh co ban trong DOS

Examples:
List the services running under each process: 
TASKLIST /svc 
List the services running under each 
SvcHost
process: 
TASKLIST /FI "imagename eq svchost.exe" /svc 
List the services running now:
TASKLIST /v /fi "STATUS eq running"
List the services running under a specific user account:
TASKLIST /v /fi "username eq SERVICE_ACCT05"
“Here's to the success of our impossible task!” ~ Soviet dissidents, 1975
TIME
 
Display or set the system time. 
Syntax 
TIME [new_time
TIME 
TIME /T 
key 
new_time : The time as HH:MM 
TIME with no parameters will display the current time and prompt
for a new value. Pressing ENTER will keep the same time. 
/T : Just display the time, formatted according to the current 
Regional settings. 
Time Formatting
In Control Panel, Regional settings a Time Appearance can be set. This can be used to change 
the separator, and the number of characters used to display hours and minutes. 
To display the time including Seconds: 
ECHO.| TIME will display the time, including seconds and hundredths of a second
The time separator and the Country Code are user settings in the registry: 
The 
time separator
can be read using 
REG
 as follows 
@echo off 
FOR /F "TOKENS=3" %%D IN ('REG QUERY ^"HKEY_CURRENT_USER\Control 
Panel\International^" /v sTime ^| find ^"REG_SZ^"') DO ( 
SET _time_sep=%%D) 
echo %_time_sep% 
To read the 
Country Code
replace sTime in the above with iCountry. 


The time formats for different country codes are as follows: 
Country or language CountryCode Date format Time format 
United States 001 01/03/1994 5:35:00.00p
Czechoslovakia 042 03.01.1994 17:35:00
France 033 03.01.1994 17:35:00 
Germany 049 03.01.1994 17:35:00 
Latin America 003 03/01/1994 5:35:00.00p
International English 061 03/01/1994 17:35:00.00 
Portugal 351 03-01-1994 17:35:00 
Finland 358 3.1.1994 17.35.00 
Switzerland 041 03.01.94 17 35.00 
Norway 047 03.01.94 17:35:00
Belgium 032 03/01/94 17:35:00
Brazil 055 03/01/94 17:35:00
Italy 039 03/01/94 17.35.00
United Kingdom 044 03/01/94 17:35:00.00
Denmark 045 03-01-94 17.35.00
Netherlands 031 03-01-94 17:35:00
Spain 034 3/01/94 17:35:00
Hungary 036 1994.01.03 17:35:00
Canadian-French 002 1994-01-03 17:35:00
Poland 048 1994-01-03 17:35:00
Sweden 046 1994-01-03 17.35.00
TIME is an 
internal
 command. If 
Command Extensions
 are disabled TIME will not support the /T 
switch 
“Time is like money, the less we have of it to spare, the further we make it go” - Josh Billings 
TIMEOUT.exe
 (Windows 7/2008 and XP 
Resource Kit

Delay execution for a few seconds/minutes (for use within a batch file.) 
Syntax 
TIMEOUT delay 
Key 
delay Delay in seconds (between -1 and 100000) to wait before 
continuing.
The value -1 causes the computer to wait indefinitely for a 
keystroke
(like the PAUSE command) 
Timeout will pause command execution for a number of seconds, after which it continues 
without requiring a user keystroke. If the user does press a key at any point, execution will 
resume immediately. 

tải về 1.67 Mb.

Chia sẻ với bạn bè của bạn:
1   ...   82   83   84   85   86   87   88   89   ...   92




Cơ sở dữ liệu được bảo vệ bởi bản quyền ©hocday.com 2024
được sử dụng cho việc quản lý

    Quê hương