parsed.org

Tips by tag: dos

Convert DOS Files by xinu on Jan 20, 2005 10:55 AM

There are a few different ways to convert a DOS file to Unix format, but the most available is probably this:

$ col -bx < dosfile > unixfile
colcommandsconvertdosfilterline-endingsnewlineshellunix
Memory Hogs by xinu on Apr 21, 2008 11:28 AM

To list all the high memory processes in cmd:

C:\Windows\System32>tasklist /fi "memusage gt 10000"
Image Name                   PID Session Name     Session#    Mem Usage
========================= ====== ================ ======== ============
svchost.exe                 1600 Console                 0     30,296 K
MsDtsSrvr.exe                964 Console                 0     14,272 K
Rtvscan.exe                  920 Console                 0     47,524 K
searchindexer.exe           2364 Console                 0     33,392 K
explorer.exe                3220 Console                 0     38,992 K
vmware-tray.exe             2452 Console                 0     20,068 K
DSAgnt.exe                  4252 Console                 0     11,664 K
Launchy.exe                 4892 Console                 0     17,704 K
WindowsSearch.exe           5448 Console                 0     11,800 K
OUTLOOK.EXE                 5004 Console                 0     84,624 K
pidgin.exe                  5744 Console                 0     24,308 K
firefox.exe                 4756 Console                 0    122,652 K
cmddosloadmemoryprocessestasklist
Replace CR/LF with CR by xinu on Jun 07, 2005 11:21 AM

Given an array @slobber, replace all the CR-LF with CR:

foreach (@slobber) {
   s/\015\012$/\n/; print;
}
dosforeachlanguagesline-endingsperlprogrammingsyntaxunix
Turn off System Beep by xinu on Feb 08, 2008 08:54 AM

Tired of that annoying system beep going off while you're typing away in vim? Turn it off with this command:

C:\> net stop beep
beepcmddossystem
RSS