How does Unix Command interpreted at OS level [closed] - unix

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am new to Unix and wanted to understand under the hood working of Unix command. My question is whenever we type any command in shell, how are they interpreted at OS level.
Any help will be great. Thanks.

Actually, the interpretation of commands is done by the shell, not the operating system.
As mentioned in a comment, the operating system provides system calls like fork() and execve() that allow the creation and manipulation of processes. There are also calls that control file descriptors so that inputs and output can be arbitrarily mapped. The operating system provides all of this functionality, but it is up to the shell (bash, csh, zsh, etc) to interpret commands and issue the correct system calls.

Related

Run several likely-to-crash R scripts [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I have several scripts that are likely to crash. Is there a way to run these R scripts (perhaps from a different R script), in a way such that if one if them crashes, it doesn't pull down the others?
These are independent R scripts, running on Windows. By crashing I mean that when I try to run them in the R Gui, after some while Windows tells me R GUI stopped responding: Close program / Find solution.
Catch errors using tryCatch(), and stop execution using stop().
You can do these within a single script by wrapping them within a function, or you can source() scripts within scripts. This decision should really be dictated by your problem's logical structure and your programming practice, not by how errors are caught.

Is it possible to run a R script using a web server? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Is it possible to run a R script using a web server, similar to Perl CGI?
Yes and you can even run Rstudio remotely on a webpage.
If you want to just run a R script, you have several options:
you can simply ssh your computer that have R
find an online solution (here is the list from CRAN).
build your own server with Rook
depending what you want to do a shiny app could help as well
You have other solutions such as rApache if you didn't like other soltutions

What other programming languages run on PNaCl? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
As I understand it, PNaCl is designed to support C and C++. Has anyone managed to get any other languages (that compile to native code) to run in PNaCl?
Ruby, Lua, and a number of other languages have been ported to NaCl already. See the list of NaCl ports for full documentation. https://code.google.com/p/naclports/wiki/PortList
There are a couple of different approaches for targeting other languages to PNaCl. One is compiling the language interpreter with the PNaCl toolchain. Since most interpreters/VMs are written in C and C++, this turns out to be easy in practice. naclports already has Lua, Python and Ruby running in this manner.
A more direct approach is taken by llgo - actually emitting PNaCl bitcode. There were also discussions about Mono (which does run on NaCl) on PNaCl - https://groups.google.com/forum/#!topic/native-client-discuss/Km1FOVH6yn0
The real answer is - it's still early (PNaCl was released publicly last week!); this is a ripe field for disruption because the technology is new. If someone wants to port other languages, it would be very welcome.

What encryption algorithm is used by linux's 'zip' command? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm aware that the default encryption provided by the zip command in Linux isn't considered to be secure, but I'm curious - what algorithm does it use when encrypting with the --encrypt option?
Since the zip command will write out PKZIP files, it would follow they're implementing the specs for that. Apparently the format allows for several distinct ciphers, the one typically considered "insecure" looks like it's homegrown.
See here for a detailed discussion of how to break it, including some insights into the original algorithm: http://math.ucr.edu/~mike/zipattacks.pdf
Traditional encryption is based on a stream cypher by Roger Schaffely.
The exact, symmetric algorithm is illustrated here http://www.academia.edu/348210/PKZIP_Algorithm
Newer versions of the linux zip utility (zip-info) seem to be going to include AES encryption aswell:
http://www.info-zip.org/phpBB3/viewtopic.php?f=4&t=396&p=2453&hilit=aes#p2453

Microsoft DOS vs Unix [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 12 years ago.
Improve this question
Which one is more powerful operating system? And is it possible to convert Microsoft-DOS batch file into Unix Script and vice-versa?
DOS is a 16-bit monouser operating system, without any kind of memory protection. UNIX is a 32/64 bit multiuser operating system, with multiprocess scheduling, userspace/kernel space separation and memory protection.
From just that description, i can say UNIX is a lot more powerful than DOS. But of course depends on your requirements :)
Is it possible to convert a .bat file to a unixshell script, sure, just do it by hand.
It depends how you define power. By most common definitions a multi-user OS (UNIX) is more powerful than a single user one (DOS). However this is not always the case. If your requirements are for a embedded single user system , then one could argue that a single user OS is better.

Resources