o-s

Common DOS/Windows commands and their Linux counterparts

April 24, 2010

 

Copy a file  copy path1filename1 path2filename2  cp path1/filename1 path2/filename2 
Copy subdirectory  xcopy path1. path2 /s  cp -R path1 path2 
Delete a file  del filename  rm filename 
Move a file  move path1filename1 path2  mv path1/filename1
path2     
Rename a file  ren filename1 filename2  mv filename1 filename2 
List a directory  dir  ls 
Change directory  cd path  cd /path 
Make directory  md path  md path 
Delete a subdirectory  deltree path1  rm -R path 
List text file contents  type filename  cat filename 
Edit a file  edit filename  pico filename 
Format floppy  format a:  fdformat /fd0H1440 
Check for disk errors  chkdsk drive -or- scandisk drive  fsck /device 
Change file attribute  attrib +- attribute filename  chmod mode filename 
Clear screen  cls  clear 
Display environment variables  set  env 
Set environment variable  set variable=value  env variable=value 
Set time  time time  date MMDDHHSS 
Close command prompt  exit  exit