Author Topic: DOS vs. Linux  (Read 11613 times)

0 Members and 1 Guest are viewing this topic.

Online rstofer

  • Super Contributor
  • ***
  • Posts: 8522
  • Country: us
Re: DOS vs. Linux
« Reply #25 on: November 30, 2020, 11:09:55 pm »
A side note: avoid dd. Not only it has zero benefits for most operations, but its behavior is misunderstood and leads to unexpected outcomes. It’s also too easy to misuse, which led to its alternative name: disk destroyer. cat and head are more than enough, possibly supplemented with tee.


The IBM 1130, for which I have an FPGA version, uses 321 16-bit words per sector times some number of sectors per track times some number of tracks.  I want to map that to a Compact Flash with 512 bytes per sector.

I have a complete disk image in 1130 format built by a Makefile running at the command line.  Now I want to reconfigure the image and write it to the Compact Flash using two 512-byte (thus 512 16-bit words) per logical sector and zero padding the 2d physical sector.

'dd' is the entire reason I bothered to learn about Linux way back a long time ago.  It just turns out to be one of the more important utilities available - to me!  Yes, things can go wrong in an instant.  It doesn't check your choice of /dev/sd*, it just does what it is told.

But when you can run a command line cross-assembler, use 'make' and a talented Makefile along with a bit of C code to reconfigure the sectors and the 'dd' utility to write the Compact Flash, nothing else comes close.  One command builds and transfers EVERYTHING.  By all means, learn about Makefiles!

Let's face it, Linux is on less than 2% of desktops (it dominates the server market).  After 20 years and a compelling price, they can't even give the thing away.  It is simply too command line oriented.  Too many things can NOT be set up in a GUI and you wind up spending a lot of time typing commands.  In fact, only fairly high level applications run at the GUI level.  Digilent Waveforms or the Arduino IDE are examples as is Eclipse.  You can not compile and run a C program from the GUI unless you have an IDE of some type.  Awkward if all you want is the output.  Maybe write the code with 'geany' and compile it with the 'cc' compiler and run it.  Here come the numbers!

The command line is king.  If you don't want to use it, just run Windows.  Even with PowerShell, Windows doesn't come close to mirroring *nix.  And the Bash shell on Win 10?  Try to print a file or exchange a file with the Windows filesystem.  It's a mess!  I have it on all my Win 10 boxes and never use it.

It takes a long time to learn the Linux commands.  Just do an 'ls' on /bin, /sbin, /usr/bin, /usr/sbin and see how many utilities there are.  Hundreds!  And there'll be a test later!

« Last Edit: November 30, 2020, 11:15:24 pm by rstofer »
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 16104
  • Country: us
Re: DOS vs. Linux
« Reply #26 on: November 30, 2020, 11:57:34 pm »
Unless you're hoping to get a job as a Linux/Unix administrator you don't need to learn all of the commands. 99% of normal use involves maybe 5-10 commands that get used frequently, then there is a lot of other stuff that is used internally by the system, or that get used for various edge cases. If you don't know how to accomplish a specific task that's when you can look for the command to do it.
 

Offline bostonman

  • Frequent Contributor
  • **
  • Posts: 675
  • Country: us
Re: DOS vs. Linux
« Reply #27 on: December 01, 2020, 01:35:54 am »
As predicted, I got lots of (and more than expected) input.

Just to clarify on a few points. I'm not "comparing" Linux to DOS. My question was based on them both being similar since they run command lines and have option (?) such as a forward slash and a letter after a command.

The need to learn and/or use Linux is based off of periodically using Ubuntu and recently a Raspberry Pi. With the Raspberry Pi (as someone pointed out), I needed to read a list of steps to set it up, however, I understood very little. The need for using DD came from a failing hard drive where a GUI wasn't working, so most recommended DD. To be honest, I thought it was great advice because it worked well, but I didn't understand anything I was doing, just read steps.

My question about Linux somewhat arose from using DD. While DD was highly recommended, I got suggestions about DD variations, along with using different commands.

In DOS, if you want to 'copy' something, you use 'copy', but it seems in Linux a plethora of commands exist to do the same thing. My confusion comes from how do I know which commands exist, how to determine the best one, and just plan confusion over (to use as an example) the apt-get blah blah

When I set up the Raspberry Pi, I attempted to surf the Internet and couldn't play video. After researching, I ended up typing a list of apt-get and various other commands that spewed out what seemed like 1000s of lines of text updates. In some cases I'd see something that read failed (or a variation of that word - I forgot now), but then it would continue and I'd need to guess whether after 1000s of lines were executed, that the apt installed correctly.

Does anyone have a suggestion on a book? As someone pointed out, they, and myself, prefer a book over searching the net. A nice book with a list of commands and stuff would be nice, but I'm sure this is a loaded question.
 

Offline DimitriP

  • Super Contributor
  • ***
  • Posts: 1150
  • Country: us
  • "Best practices" are best not practiced.© Dimitri
Re: DOS vs. Linux
« Reply #28 on: December 01, 2020, 02:30:29 am »
Quote
While DD was highly recommended, I got suggestions about DD variations, along with using different commands.
This is another case of "I was told to do X"
So here I am, How can I do X?
"people" are always ready to throw out  "advice".

You have a splinter?
Use a small sharp knife to cut the skin open . <inserts amazon link to sharp knife>

I most cases especially with rPi, it's used as a stepping stone to accomplish something else.
Chefs usually cook in their  kitchen, they don't install the electrical panel for the oven, after they operated a forklift to move it from the delivery truckinto the building.

So.......what I'm trying to say , if you wanna learn enough linux to get stuff done, do.
But if you need to "use it" for something else, don't. Get someone else to configure it for you.
The problem usually is not basic commands, but understanding the concept behind it.
DOS, doesn't have a "dd" command. You are not "copying a file" a'ala copy myfile.txt myfile2.txt
Without  understanding why dd is being used it all goes south

And no matter which "variation" was suggested, every one of the options is documented.
"man dd" will show you every option available, but I have no idea if man pages get installed on rPi distributions

...and just to be clear...when having a question it's better to come out and ask it, "after some googling" so no one like me comes back with "is your google broken?" , instead of starting with a vague comparison of DOS vs linux where the only thigng they have "in common" is the "prompt where you type stuff in"  which too many people refer to it as ........DOS....
   If three 100  Ohm resistors are connected in parallel, and in series with a 200 Ohm resistor, how many resistors do you have? 
 

Offline bostonman

  • Frequent Contributor
  • **
  • Posts: 675
  • Country: us
Re: DOS vs. Linux
« Reply #29 on: December 01, 2020, 03:30:51 am »
Quote
...and just to be clear...when having a question it's better to come out and ask it, "after some googling"

I believe my question was clearly asked, however, I asked a question regarding confusion, so maybe it wasn't clear enough for you (and possibly others).

My question was somewhat simple: DOS vs. Linux and basically why is DOS easy to navigate while Linux seems to have an endless (and confusing) number of command options.

My last sentence in my previous post did inquire about whether anyone know a good reference book I can buy to have as a reference to avoid having to ask (or Google).
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 2358
  • Country: nz
  • Formerly SiFive, Samsung R&D
Re: DOS vs. Linux
« Reply #30 on: December 01, 2020, 04:23:52 am »
Unless you're hoping to get a job as a Linux/Unix administrator you don't need to learn all of the commands. 99% of normal use involves maybe 5-10 commands that get used frequently, then there is a lot of other stuff that is used internally by the system, or that get used for various edge cases. If you don't know how to accomplish a specific task that's when you can look for the command to do it.

Since I use Linux for 99% of everything, I just used it to check my most common commands used:

Code: [Select]
$ awk '{print $1}' ~/.bash_history | sort | uniq -c | sort -n -k1 -r

As I have removing duplicates turned on, this only counts different variations of the same command, rather than the number of times actually used.

The (slightly redacted) results:

Code: [Select]
    659 cd
    600 git
    564 l
    489 sudo
    419 riscv64-unknown-elf-gcc
    388 ssh
    386 gcc
    344 man
    332 scp
    280 riscv64-unknown-elf-objdump
    246 cat
    242 rm
    219 less
    210 time
    192 arm-linux-gnueabihf-gcc
    159 clang
    144 find
    141 make
    136 mv
    120 echo
    113 mkdir
    104 emacs
     92 spike
     86 cal
     82 du
     81 objdump
     73 file
     72 ls
     70 cp
     69 top
     69 for
     65 arm-linux-gnueabihf-objdump
     63 pushd
     62 grep
     50 perl
     48 qemu-riscv64
     48 df
     41 which
     41 tar
     39 ifconfig
     38 riscv64-unknown-elf-ld
     37 riscv64-unknown-elf-as
     36 riscv64-unknown-elf-objcopy
     34 avr-gcc
     32 riscv32-unknown-elf-gcc
     31 qemu-riscv32
     30 llc
     30 ./configure
     28 export
     26 uptime
     26 cmake
     23 kill
     22 aarch64-linux-gnu-gcc
     21 seq
     21 dos2unix
     20 size
     20 /home/bruce/software/arduino-1.8.10/hardware/tools/avr/bin/avrdude
     19 ping
     18 cut
     18 avr-objdump
     16 tail
     16 python
     16 opt
     15 perf
     15 minicom
     15 lsblk
     14 uname
     14 popd
     14 aarch64-linux-gnu-objdump
     13 while
     12 zcat
     12 rmdir
     12 ln
     11 sort
     11 ../configure
     10 unzip
     10 mtr
     10 killall
     10 gunzip
     10 apt
      9 wc
      9 nslookup
      9 lsb_release
      9 chmod
      8 diff
      7 wget
      7 set
      7 pgrep
      7 awk
      7 apt-get
      6 sync
      6 asciidoc
      5 stty
      5 strings
      5 riscv64-unknown-linux-gnu-gcc
      5 curl
      5 crontab
      4 vi
      4 pwd
      4 lsusb
      4 date
      4 cmp
      3 unix2dos
      3 touch
      3 shasum
      3 screen
      2 su
      2 strip
 
The following users thanked this post: Ed.Kloonk

Offline DimitriP

  • Super Contributor
  • ***
  • Posts: 1150
  • Country: us
  • "Best practices" are best not practiced.© Dimitri
Re: DOS vs. Linux
« Reply #31 on: December 01, 2020, 04:45:54 am »
Quote
...and just to be clear...when having a question it's better to come out and ask it, "after some googling"

I believe my question was clearly asked, however, I asked a question regarding confusion, so maybe it wasn't clear enough for you (and possibly others).

My question was somewhat simple: DOS vs. Linux and basically why is DOS easy to navigate while Linux seems to have an endless (and confusing) number of command options.

My last sentence in my previous post did inquire about whether anyone know a good reference book I can buy to have as a reference to avoid having to ask (or Google).


Take a look here :
http://www.yolinux.com/TUTORIALS/unix_for_dos_users.html

and for more specific in-depth info:
https://man7.org/linux/man-pages/dir_section_1.html



   If three 100  Ohm resistors are connected in parallel, and in series with a 200 Ohm resistor, how many resistors do you have? 
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 16104
  • Country: us
Re: DOS vs. Linux
« Reply #32 on: December 01, 2020, 06:01:26 am »
In DOS, if you want to 'copy' something, you use 'copy', but it seems in Linux a plethora of commands exist to do the same thing. My confusion comes from how do I know which commands exist, how to determine the best one, and just plan confusion over (to use as an example) the apt-get blah blah

Such as?

To copy a file you use 'cp', it works almost identically to the DOS 'copy' command.


apt-get is the package manager interface, it's used to install packages from a repository. It's a capability that DOS doesn't have in the first place so there's no direct equivalent.
 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 8522
  • Country: us
Re: DOS vs. Linux
« Reply #33 on: December 01, 2020, 07:08:46 am »
man pages are installed on Raspbian.  Same as any other Debian distribution  from which it is derived.
« Last Edit: December 01, 2020, 07:29:54 am by rstofer »
 

Offline Karel

  • Super Contributor
  • ***
  • Posts: 1764
  • Country: 00
Re: DOS vs. Linux
« Reply #34 on: December 01, 2020, 07:37:59 am »
what is your basis of saying that?

i dont see any KiCAD nor Linux specific/specialized EDA/CAD taking a big chunk in the stats.. all point to softwares in Windows. are you saying..

1) engineers using Wine/VMware in Linux just to run few professional and expensive Windows softwares?
2) engineers/scientists that work from home, government or non profitable agencies? that never see the light in those statistics?

or am i missing something? show me some facts please.

The following industry grade EDA software runs natively on Linux: Cadence, Zuken, ADS (Keysight).

For FPGA's: Altera and Xilinx

For MCU's, almost all of them e.g. STMCube/IDE,  Microchip

I don't believe that they would keep offering Linux based software for many years in a row,
if there shouldn't be a demand from the market.

Mech CAD is another story though...
 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 8522
  • Country: us
Re: DOS vs. Linux
« Reply #35 on: December 01, 2020, 07:47:51 am »
I might just pick a Command Line book at random like:

https://www.amazon.com/Linux-Command-Line-2nd-Introduction/dp/1593279523

The reason that Unix/Linux uses cp instead of copy is simple:  Programmers are lazy and they don't want to type any more than necessary.

Or maybe this excuse:

https://catonmat.net/why-unix-commands-are-short

Well, way back then, the teletype was king and it actually was difficult to type.  There was a time before 'glass teletypes'.  The CRTs didn't really show up much before the early '70s.  I think I got my ADM3 around '75.  I got the Televideo TV 950 a couple of years later.

Yes, graphics terminals were around much earlier but they weren't usually the main console and they were expensive.

cd is a utility and is pretty much the same on all *nix systems.
apt-get is an application and works only with some Linux distributions.  It may not be covered in every book on Linux commands because it isn't really a command in the sense of cp or rm.

When you want to wander through the file system and save some typing, look up the push and pop commands.  If I do something like $ push /etc, I actually change to the /etc directory just as though I used $ cd /etc.  But to get back to where I came from, all I have to do is $ pop

 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 2358
  • Country: nz
  • Formerly SiFive, Samsung R&D
Re: DOS vs. Linux
« Reply #36 on: December 01, 2020, 07:50:56 am »
When you want to wander through the file system and save some typing, look up the push and pop commands.  If I do something like $ push /etc, I actually change to the /etc directory just as though I used $ cd /etc.  But to get back to where I came from, all I have to do is $ pop

Which shell has push/pop rather than the usual pushd/popd?
 

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 2870
  • Country: fi
    • My home page and email address
Re: DOS vs. Linux
« Reply #37 on: December 01, 2020, 10:02:49 am »
My question was somewhat simple: DOS vs. Linux and basically why is DOS easy to navigate while Linux seems to have an endless (and confusing) number of command options.
This is because DOS is simple, and Linux distributions complex.

One big difference is due to privilege separation.  DOS has none, Linux has full user-group model and independent capabilities models.
Another is device support.  DOS supports parallel and serial port, floppy drives, hard drives, and a NUL: device (IIRC), but Linux supports a lot of different devices, down to GPIO pins if your computer or device has those.
Third is the kernel configurability and interfaces, i.e. the /proc and /sys pseudo-filesystems providing direct access to the kernel internals.

For example, in DOS, you cannot know what TSR (terminate-stay-resident) programs are currently running.  In Linux, we have the /proc/PID/ pseudo-directories exposing every one, including kernel threads doing userspace tasks.

The comparison is therefore not very fair, because Linux-kerneled operating systems are so much more than DOS ever was.  But that is the core reason for the huge difference in complexity as well.  We'd have to strip most of what is Linux to get down to the simplicity DOS was.  So, why don't we?  Because those "added" features are what makes Linux useful.  It is often not easy to see that, because those features are used internally by the utilities we do use.

Story time:

When I developed a self-replicating USB stick that was used to measure high-performance computing nodes – run and time specific gromacs, vasp, and dalton simulations compiled as static x86-64 binaries with generic optimization –, I started with a very DOS-like environment.  Basically, all I had were GNU coreutils: cat chgrp chmod chown cp date dd df dir echo false ln ls mkdir mknod mktemp mv pwd readlink rm rmdir sleep stty sync touch true uname vdir [ arch b2sum base32 base64 basename chcon cksum comm csplit cut dircolors dirname du env expand expr factor fmt fold groups head hostid id install join link logname md5sum mkfifo nice nl nohup nproc numfmt od paste pathchk pinky pr printenv printf ptx realpath runcon seq sha1sum sha224sum sha256sum sha384sum sha512sum shred shuf sort split stat stdbuf sum tac tail tee test timeout tr truncate tsort tty unexpand uniq unlink users wc who whoami yes md5sum.textutils.
It had a custom kernel with an initial ramdisk (initrd) with all relevant drivers (mostly raid stuff, really) compiled as modules, but not even an init system.
(This was just before systemd.  I'm not even sure you could do this with Debian anymore, or any other systemd-based system.)
I used the venerable SystemV init binary to provide a tty interface (loginless/passwordless bash shell) to be used to examine the USB stick, and to replicate the stick itself via a command if wanted, with /etc/rc (if I recall correctly) running the actual measurement system, automatically shutting down (after some 8 hours of calculations) when done.

If that sort of thing interests you, I recommend taking a look at Linux From Scratch.  It is basically an online book by Gerard Beekmans, Matthew Burgess, Bruce Dubbs, and others, for how to build a Linux system directly from sources.  Not only is it very informative and teaches one a lot about how the userspace part of the operating system (as opposed to the kernel) is put together.  The environment you have at the end of the LFS book is very DOS-like.

Which shell has push/pop rather than the usual pushd/popd?
Anyone who has
    alias push=pushd
    alias pop=popd
in their profile?  After all, you yourself have something like
    alias l='ls -laF --color=auto'
don't you? 8)
Me, I even have alias dir='ls -laF --color=auto' myself.  Some habits die hard, let's not be too judgy!
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 2358
  • Country: nz
  • Formerly SiFive, Samsung R&D
Re: DOS vs. Linux
« Reply #38 on: December 01, 2020, 10:40:43 am »
Which shell has push/pop rather than the usual pushd/popd?
Anyone who has
    alias push=pushd
    alias pop=popd
in their profile?  After all, you yourself have something like
    alias l='ls -laF --color=auto'
don't you? 8)
Me, I even have alias dir='ls -laF --color=auto' myself.  Some habits die hard, let's not be too judgy!

Just alias l="ls -l". Personal aliases are one thing, telling a newbie struggling with Linux to "look up" personal aliases is a little different :-)

Habits .. yes, I had to unlearn "dir" and use "ls", but I think forgetting "pip" and using "cp" took my fingers longer.
 

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 2870
  • Country: fi
    • My home page and email address
Re: DOS vs. Linux
« Reply #39 on: December 01, 2020, 10:51:55 am »
Personal aliases are one thing, telling a newbie struggling with Linux to "look up" personal aliases is a little different :-)
Very true, but because of muscle memory, it is too easy to forget the Bash built-ins are pushd and popd instead of just push and pop.  (I'd like to give rstofer a little slack here, because I too make that sort of errors regularly.)

It is good to point out the correct commands, though. :-+

Habits .. yes, I had to unlearn "dir" and use "ls", but I think forgetting "pip" and using "cp" took my fingers longer.
pip was from CP/M, wasn't it?  Oops, no, originally from DEC PDP-6!

Also, the file specification strings part of the Wikipedia article on PIP shines interesting light on DOS device naming as well.
 

Offline DiTBho

  • Frequent Contributor
  • **
  • Posts: 962
  • Country: gb
Re: DOS vs. Linux
« Reply #40 on: December 01, 2020, 11:03:09 am »
One big difference is due to privilege separation.  DOS has none, Linux has full user-group model and independent capabilities models.

BeOS v4 and v5 is (somehow) UNIX-like OS, but it never had any user-group model, multi-users and privileges. You have a bash shell, gcc, and a subset of the UNIX programs (dd was banned and not included with the install for some reason, I had to compile it myself), and are always logged as "root".

Insanely great, ain't it?

I loved it for two years; my first computer was a home-computer only able to run BASIC(1989), then I switched to a DOS computer(1993), improved into "DOS with Microsoft LanMan" (1997, it added TCP/IP, ftp, telnet, ping, ...), then to BeOS(2001), and finally to Linux (2003).

So literally in my learning experience these "user-group model, privileges" things have improved linearly time by time :D :D :D
« Last Edit: December 01, 2020, 11:13:01 am by DiTBho »
 

Offline DiTBho

  • Frequent Contributor
  • **
  • Posts: 962
  • Country: gb
Re: DOS vs. Linux
« Reply #41 on: December 01, 2020, 11:06:02 am »
Another is device support.  DOS supports parallel and serial port, floppy drives, hard drives, and a NUL: device (IIRC), but Linux supports a lot of different devices, down to GPIO pins if your computer or device has those.

A thing I loved about BeOS which I miss in Linux: the network-class of devices (ethernet, FC, AFDX, etc) doesn't have a devname.

You cannot assign an IP-address with "echo 192.168.1.12 > /dev/eth0/ip", it doesn't work this way, and you need to use a program like "ifconfig etho0 192.168.1.12", and if you open a socket, there here is no "/dev/eth0/sock-xxxx" exported to the devfs (/dev/), and you need programs like NetCat to recreat this functionality (it's useful to clone a partition through the network, or just to chat), while on BeOS you had all of these exported by the Kernel.

I loved it, really!  :D

Ok, with Python it's not a problem nowadays. You open an editor, you write a few lines, and you get a socket-ID from which you can receive some byte, and write some byte. No, problem, just a bit of nostalgia.
 

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 2870
  • Country: fi
    • My home page and email address
Re: DOS vs. Linux
« Reply #42 on: December 01, 2020, 11:24:36 am »
One big difference is due to privilege separation.  DOS has none, Linux has full user-group model and independent capabilities models.

BeOS v4 and v5 is (somehow) UNIX-like OS, but it never had any user-group model, multi-users and privileges. You have a bash shell, gcc, and a subset of the UNIX programs (dd was banned and not includes in the install for some reason, I had to compile it myself), and are always logged as "root".

Insanely great, ain't it?
I am so paranoid (or used to not trusting any user, including myself), that that gives me the heebie-jeebies! :scared:

A thing I loved about BeOS which I miss in Linux: the network-class of devices (ethernet, FC, AFDX, etc) doesn't have a devname.
Well, you could always write a character device driver that does that, just like say GPIO drivers do.  (They also expose new device nodes dynamically.)

It wouldn't even be that complicated, since the existing iptables (netfilter, actually) talks to the kernel via a netlink socket.  Your custom BeOS-like driver would just provide a parallel access to it.

It might be an interesting exercise, if one is familiar with the BeOS interface (since one has an idea how it should work – that's the part that takes the most work!), and wants to learn how to write Linux driver modules.  The Linux Device Drivers books (especially 3rd edition freely available on the net) are very useful, but somewhat dated; one must check most things against the Linux kernel developer documentation to make sure one is using the most up-to-date interfaces.

As to TCP and UDP sockets, Bash does provide /dev/tcp/host/port and /dev/udp/host/port functionality (by interposing such paths with its own support machinery).  You can do things like
Code: [Select]
#!/bin/bash
exec 3<>/dev/tcp/duckduckgo.com/80
printf 'GET / HTTP/1.0\r\nHost: duckduckgo.com\r\nConnection: close\r\n\r\n' >&3
cat <&3
to do your own HTTP client.  This is ages old, and was/is used in e.g. aforementioned LinuxFromScratch to obtain the IANA Service registry (human-readable version; the file that tells which TCP or UDP port number each service name uses), without an existing HTTP client, early enough in the build process.
 
The following users thanked this post: DiTBho

Offline DiTBho

  • Frequent Contributor
  • **
  • Posts: 962
  • Country: gb
Re: DOS vs. Linux
« Reply #43 on: December 01, 2020, 12:01:39 pm »
BeOS is dead nowadays, it won't for sure run on a modern PC, there are no drivers, and Be Inc, the company that was operated by Jean-Louis Gassée as leader is no more existing.

The company was sold to Palm years ago, and the idea of BeOS "replaced" by Haiku, as you can read in its presentation "Haiku is an open-source operating system that specifically targets personal computing. Inspired by the BeOS, Haiku is fast, simple to use, easy to learn and yet very powerful".

It's multi-user, and it has user-group privileges. All great add-on :D

There is a beta-CD installer freely downloadable, it contains everything; Haiku is UNIX-like and it's much simpler than Linux (even if more limited, and with less applications), maybe a good dialectical experience for those who come from DOS/Windows.
 

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 2870
  • Country: fi
    • My home page and email address
Re: DOS vs. Linux
« Reply #44 on: December 01, 2020, 12:48:19 pm »
Haiku is UNIX-like and it's much simpler than Linux (even if more limited, and with less applications), maybe a good dialectical experience for those who come from DOS/Windows.
Yup.  My own observations (across maybe a hundred or two hundred people, but in an Uni environment, spread over a couple of decades; so not random per se) indicate that experience with getting different operating systems (and programming languages!) do what one wants – as opposed to copying existing recipes or learning actions by rote without understanding – makes it somehow easier/more efficient in utilising the existing ones and learning new ones.

I think it is part of "opening up paradigms", or being able to see "outside the box"; something akin to stopping and looking around to perceive the things around you, instead of focusing on the path you are on.  (I do not really know how to express this precisely.)
Part of it is that when you have fewer expectations on how things should work, you are more open to learning how they actually do work in a particular environment.  This applies to all areas of human learning, though, and I see it in science (physics in particular) all the time.  The hot-water-freezes-faster-than-cold-water experiment is a particularly apt example. (Simply put, the hydrogen-oxygen bond length affects the heat capacity; it's an extra degree of freedom that rapid convective cooling affects slower than it affects the overall temperature.  Most physicists still have difficulties accepting it, even though it is a simple experiment easily verified, and even duplicated in simulations.)

This is also why I always recommend learning through understanding, instead of copying recipes as-is.  Sure, you need to initially copy recipes to get stuff done – and getting stuff done is the point – but finding out why and how (in the engineering sense as opposed to science or philosophy) will eventually yield better tools and enables better control and more efficient workflows.  Instead of copying or repeating things, you can create new workflows.
 
The following users thanked this post: paf, DiTBho

Offline PKTKS

  • Super Contributor
  • ***
  • Posts: 1238
  • Country: br
Re: DOS vs. Linux
« Reply #45 on: December 01, 2020, 01:26:10 pm »

  :popcorn:

I could not avoid some laughs across this one...

And felt  insanely compelled to start a thread
about    CP/M  x  XENIX  x SCO  ....

Like Willy Coyote they always hit the ground...

Paul
 

Offline golden_labels

  • Frequent Contributor
  • **
  • Posts: 400
  • Country: pl
Re: DOS vs. Linux
« Reply #46 on: December 01, 2020, 03:50:37 pm »
The IBM 1130, for which I have an FPGA version, uses 321 16-bit words per sector times some number of sectors per track times some number of tracks.  I want to map that to a Compact Flash with 512 bytes per sector. (…)
I just hope you know that dd may randomly fill some sectors with garbage and shift data to others. Unless you use GNU Coreutils version of dd, which offers a non-standard fullblock input flag to control that — but then you must remember to always specify it. However, I said “most”. Yes, there are some situations in which dd may be useful. For this particular one, I would still write a separate program.

'dd' is the entire reason I bothered to learn about Linux way back a long time ago.
But… you can use dd on Windows too. Cygwin or MSYS, and I think one should be available through WSL. :D
Or “a long time ago” was more than 15 years ago?

The command line is king.  If you don't want to use it, just run Windows.  Even with PowerShell, Windows doesn't come close to mirroring *nix.  And the Bash shell on Win 10?  Try to print a file or exchange a file with the Windows filesystem.  It's a mess!  I have it on all my Win 10 boxes and never use it.
The reason I switched to Linux was because my Windows was consisting mostly of utilities typically found in Linux-based systems. They were just not fitting well into a non-POSIX environment. So I decided to embrace my inner penguin.

As predicted, I got lots of (and more than expected) input.
Of course! This is the internet! Everyone must have an opinion! ;)

Just to clarify on a few points. I'm not "comparing" Linux to DOS. My question was based on them both being similar since they run command lines and have option (?) such as a forward slash and a letter after a command.
Having a command-line shell is not a feature specific to (MS-?)DOS or Linux-based systems. Nearly any sane operating system offers some. Some larger applications do too. Windows is not an exception and not only it offers two shells by default, they are better and more widely used than those in MS-DOS.
« Last Edit: December 01, 2020, 03:52:44 pm by golden_labels »
Worth watching: Calling Bullshit — protect your friends and yourself from bullshit!
 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 8522
  • Country: us
Re: DOS vs. Linux
« Reply #47 on: December 01, 2020, 04:34:22 pm »
The IBM 1130, for which I have an FPGA version, uses 321 16-bit words per sector times some number of sectors per track times some number of tracks.  I want to map that to a Compact Flash with 512 bytes per sector. (…)
I just hope you know that dd may randomly fill some sectors with garbage and shift data to others. Unless you use GNU Coreutils version of dd, which offers a non-standard fullblock input flag to control that — but then you must remember to always specify it. However, I said “most”. Yes, there are some situations in which dd may be useful. For this particular one, I would still write a separate program.
I didn't mean to imply that I let 'dd' fill the remaining bytes in the 2d sector.  I have a little piece of C code that takes the image file and expands it to another padded file and I use that file as input to 'dd'.
Quote

'dd' is the entire reason I bothered to learn about Linux way back a long time ago.
But… you can use dd on Windows too. Cygwin or MSYS, and I think one should be available through WSL. :D
Or “a long time ago” was more than 15 years ago?
Actually, it was!  I built the project right after retiring in 2003.  For those keeping score, that's 17 years of not showing up at the office.




 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 8522
  • Country: us
Re: DOS vs. Linux
« Reply #48 on: December 01, 2020, 05:31:25 pm »
Very true, but because of muscle memory, it is too easy to forget the Bash built-ins are pushd and popd instead of just push and pop.  (I'd like to give rstofer a little slack here, because I too make that sort of errors regularly.)

It is good to point out the correct commands, though. :-+

Yes!  I must have been tired!  The good news is that push and pop will both generate an error and then I can extract my head from my *** and type pushd or popd.

Code: [Select]
$ push /etc
bash: push: command not found
$

That's also the problem with discussing Linux while working on a Win 10 machine!  Or worse, an iPad!
Quote


Habits .. yes, I had to unlearn "dir" and use "ls", but I think forgetting "pip" and using "cp" took my fingers longer.
pip was from CP/M, wasn't it?  Oops, no, originally from DEC PDP-6!

Also, the file specification strings part of the Wikipedia article on PIP shines interesting light on DOS device naming as well.

I have always had a Linux alias for dir.  I didn't have much problem forgetting pip but it turns out I was using it a couple of weeks ago on a Z80 CP/M project.

https://rc2014.co.uk/

Completely off topic:  I have a couple of the new Raspberry Pi 400 computers.  They are really slick in that the computer is built inside the keyboard.  They left out the audio connector!  Bummer!  I think I'm supposed to add Bluetooth Audio.

https://youtu.be/ZSvHJ97d8n8

I gave up on the RPi mouse, it doesn't have the forward/back buttons.  A nice Bluetooth mouse is a lot more usable.

The keyboard unit also has a USB hub - 2 USB 3.0 and 1 USB 2.0.

It makes a very tidy, and silent, Linux desktop and the speed is adequate for most things.  It's a nice place to do Linux kinds of things.  REMEMBER: It's an ARM processor so you either have to download RPi packages or build from source.  There's a reason I remember this!
 

Offline dunkemhigh

  • Super Contributor
  • ***
  • Posts: 3157
Re: DOS vs. Linux
« Reply #49 on: December 02, 2020, 01:14:04 am »
I recommend taking a look at Linux From Scratch.  It is basically an online book by Gerard Beekmans, Matthew Burgess, Bruce Dubbs, and others, for how to build a Linux system directly from sources.

You need be a Linux user in order to benefit from this book, so it seems a bit cart before horse. If that's the route to take, I would recommend cross-compiling Linux on the OS the user is comfortable with (and since we're talking DOS presumably that would be Windows). If  nothing else, it would introduce the user to where those CLI 'commands' come from and how to get them :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf