I previously wrote the "Running Linux command on Windows" to run some Linux-like bash commands on Windows, just a list of commands, without any explanation.
Some netizens and my colleagues have expressed a preference for this tool, and I recently expanded it, the more careful tool is in Win7 is full screen cmd window command FS (fullscreen abbreviation). So again the wording to explain these commands is to add a new set of commands and add a README.
Instructions for manipulating the screen are described first.
Someone on the Internet to thank the bat file, you can make the cmd window on XP full screen, like people can Google (also refer to the Windows can run Linux commands on the expansion of the batch file Fullscreen_xp.bat), But win7 on it is useless (may be my meanness, search for half a day did not find). However, there is a powerful tool WMIC on windows that can get the resolution of the screen now, and command set mode con:lines rows can change the size of the screen to fit together. The specific code is as follows:
@echo off
Setlocal enabledelayedexpansion
set/a tee=0
for/f "Tokens=1* delims=="%%a in (
' WMIC desktopmonitor get screenwidth^,screenheight^/value '
) Do (
set/a tee+=1
If "!tee!" = = "3" Set screenheight=%%b
If "!tee!" = = "4" Set screenwidth=%%b
)
set/a screenheight-=100
set/a screenwidth-=100
rem Echo%screenheight%
rem Echo%screenwidth%
Mode con lines=%screenheight%
Mode con cols=%screenwidth%
Color 60
Cls
@echo.
Because I do not use pirated software now, this article with the Write tool editor, is not good-looking, but also please everyone haihan. The specific content can refer to my Resources fullscreen.bat batch file in the extension of the batch file that can run Linux commands on Windows.
Linux.bat inside the command row, col can change the height and width of the window, this doskey command mode con; [Rows] [Lines]. Font command can modify the size of the fonts, use the Process pop-up window, you can ignore, click the space bar. There is also a clear-screen command clean (similar to the Linux-OK), which doskey the CLS command.
Linux.bat There are many commands to change the color of the window, such as black and blue. Because of too many options, and finally add four new Classic interface color command dos, eye, tradition and matrix,dos command is the window to display a typical DOS-style blue screen color, eye is suitable for the eyes of the red bean paste, tradition is the classic Black-and-white color, The matrix is a green screen (using the name of the hacker Empire). If you do not want to enter a command, you can use the colors command to select these four formats.
The window format combines the full Screen command FS and colors to make the two commands more goofy.
User logon State command about the machine command halt, restart the computer command restart and logoff the current user's command logout and exit the cmd window command Q and so on.
Process action commands have Process Details View command PS, current job view command top, kill command based on process ID, check command killall based on job name, view current user name command WhoAmI, background run job view command daemon, etc.
What needs to be explained is kill and Killall. Killall usage such as killall-w notepad.exe, you can turn off all the files in Notepad, and if there are files not saved, do not use them. The use of Kill is kill-9 Pid,pid is the process ID we see based on the PS command, or the job ID according to Windows.
Thin view command has hard drive character view command disks (valid for XP version below), hard disk Listing command LSD (abbreviation for list disk), operating system Information viewing tool uname
, Workstation Information View command Svrinfo and tools for all Hardware View tool CS (check system abbreviation). Need to explain the corresponding CS bat file Check_sys.bat, it is also Google, I changed it to English. The author can eliminate the final instructions to contact me.
The final command is to match some Linux catalog views, text editing, and lookup commands. Directory View command has view the current directory under the file command ls, current directory text Details view command ll, all file information view commands LA and current directory view directory pwd.
To use text editing commands, install Vim first. Edit commands have vi and edit, find command found, file view commands more and cat, copy command CP.
The folder Action command has command grep to create directory commands mkdir, empty folder deletion commands RmDir and find a character in the directory. The name or move command for a file or folder is mv.
The command to view command usage is man, such as Man Del.
Description: Because of this article's Windows Shell 0 Foundation, many tools are the Google comes out to adapt, these all cannot find the original copyright owner to explain, therefore to the contribution these commands the everybody to thank. If there is infringement, please send the mail to alexstocks@foxmail.com, I must respond and in the text to explain. For this article and for the shell of the resource "extensions of batch files that can run Linux commands on Windows," I own the copyright, but anyone has the right to use and modify and redistribute it. Of course, if add to my contribution to the explanation, here thanked ^_^.
In addition, I tested a test machine, after I tested the cmd window is dead or dead can not be displayed, now has the following failure:
1 keyboard operation win + R
2 in the window input cmd;
3 Click Enter after the CMD window does not display;
4 Open Task Manager, which has Cmd.exe;
5 Displays the following message after the command "mode con" bat test
Device status con:
---------
line: &NBSP ;
columns:
keyboard speed:
Keyboard delay: 1
& nbsp code page: 936
Someone who knows how to fix it, please email me, please!!!