Basic Linux Commands Under Windows
Personally I run linux at home but at work like many other people I am somewhat forced to run windows. Now windows command line or dos prompt isn’t as powerful as the shells available to you in linux, but it is still a powerful tool. Just being able to use wild cards (*) to delete files is easier than using explorer. But I when in windows dos prompt I tend to have a problem of typing linux commands when I want to do things, particularly ls when I want to type dir.
So to solve this I have created a few batch files, example:
ls.bat: @echo off dir %1 %2
This can be done with many of the equivalent dos commands, the percentages are the arguments after the command, e.g. ls /p *.jpg will be passed along as dir /p *.jpg. There are a few more commands that are easy to translate into linux like del, copy and move. But always be careful as not all dos commands use the same switches or syntax as their linux counterparts.
RSS feed for comments on this post. TrackBack URI







11:02 pm
Now coming from the Windows World to Linux world, I’d need something in reverse. :O Well, maybe a filter… so I’d learn the right thing. As I wouldn’t want to do the wrong thing forever. Copy A: B: = ? ect..? But with the Gui interface of Ubuntu etc, it’s going to take longer to get the Linux command line down, as with the old C: Prompt, the only thing that I had other then the C: prompt was Qfiler.
7:43 pm
Randy>> I originally went from Dos 3.3 to Red Hat 5.2 (bought at costco and I still have the disks) an I had that same issue to deal with. The major realization I had was that there is no drives in linux, just folders, since it was a true hierarchal file system. So once you remember that cp = copy and that your A: and B: are folders not drives you are good to go.