How To >> Browse Articles >> Linux / Unix

+5

A Few DOS to Linux Commands

Article Submitted by:
Kmartkm_max50

kmart

over 2 years ago

6 articles submitted

October 13, 2007

When you’re getting started with the Linux command line, it helps to be able to translate some commands you know into the ones you’re trying to learn. If you’re coming from a Windows or DOS environment, here’s how you’ll accomplish some common tasks using the Linux command line.

Action DOS Command Linux Command
Copy a file copy path1\filename1 path2\filename2 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 path1\filename1 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

+5
  • Pictures_for_myspace

    akki_kamiwaga

    about 1 month ago

    2 comments

    okay i am new to all this.. i have wanted to learn how to operate linux, but in order to that i need some help.. anyway feel free to help out a newbie. . . i have googletalk to instant message..please i beg for help.

  • Angieandaaron_max50

    angelahadtwins

    10 months ago

    24 comments

    I like this! I love to see the comparison code between operating systems. I am still learning how to use them. Thanks! :)

  • Avatar2607_1_max50

    jamesspeer

    about 1 year ago

    10 comments

    nice basic list..

    1 more i would like to see is searching a directory(s) for a certain file or directory useing a wildcard. I beleive in DOS it is dir /s whatever*.* and in linux it is find whatever*.* nice list though for a newb switching to linux from windows

  • Self_port04_max50

    mrc

    about 1 year ago

    2 comments

    Excellent!

  • Undead_male120x_max50

    rmelendez3

    about 1 year ago

    44 comments

    Not bad it's pretty nice to see the difference in commands between dos and linux.

  • Kmartkm_max50

    kmart

    over 2 years ago

    46 comments

    Ok...The formatting seems to have gotten lost in translation.

What's the Scoop?

Post a link to something interesting from another site, or submit your own original writing for the InsideTech community to read.

Report News Here

IT Career Advice

Sf-skyline-main_sq32

Top 25 Cities for Tech Jobs

Now more than ever, it’s important to get the best bang for your buck. And there’s no question about ...

Hotcareers-250_sq32

10 Recession-Proof IT Careers

Companies are cutting back spending, shrinking staff sizes, and making tough layoffs at a rate that most of us ...

50books_sq32

50 Books Every Geek Should Read

Ever find out one of your friends hasn't read "Neuromancer" or doesn't know what a Babelfish is or why ...

Recent Activity

Mitch_max30
Moldy01 posted in: "Dummy Lovemaking for Singles 101 ", 1 minute ago.
Photo_user_blank_big
UncaDon49 is ranked No.1 for the day in Game, 1 minute ago.
Photo_user_blank_big
UncaDon49 is ranked No.1 for the day in Game, 1 minute ago.
Photo_user_blank_big
UncaDon49 is ranked No.1 for the day in Game, 1 minute ago.
Photo_user_blank_big
UncaDon49 is ranked No.1 for the day in Game, 2 minutes ago.