Questions tagged [unix]

Unix is a multitasking, multi-user computer operating system originally developed in 1969.

58 questions
173
votes
11 answers

Is Ken Thompson's compiler hack still a threat?

Ken Thompson Hack (1984) Ken Thompson outlined a method for corrupting a compiler binary (and other compiled software, like a login script on a *nix system) in 1984. I was curious to know if modern compilation has addressed this security flaw or…
Andrew
54
votes
5 answers

What is the exact ingenuity of Unix pipe

I have heard the story of how Douglas Mcllroy came up with the concept and how Ken Thompson implemented it in one night. As far as I understand, pipe is a system call which shares a piece of memory between two processes where one process writes and…
aoak
  • 661
  • 5
  • 7
50
votes
5 answers

Is it a good idea to call shell commands from within C?

There's a unix shell command (udevadm info -q path -n /dev/ttyUSB2) that I want to call from a C program. With probably about a week of struggle, I could re-implement it myself, but I don't want to do that. Is it widely accepted good practice for…
John M
  • 511
  • 1
  • 4
  • 7
33
votes
5 answers

Is programming in the UNIX philosophy the same as Functional programming?

The UNIX Programming Environment (the classic text) states that the UNIX approach to programming is to build small, well-defined tools that can be combined to solve more complex problems. In learning C and the Bash shell, I've found this to be a…
dvanaria
  • 615
  • 6
  • 8
33
votes
7 answers

Is there a Windows philosophy of programming?

I've been programming both in Unix and Windows environments. Mostly I've worked in Unix, where I've learned Unix Philosophy, which can be summarized as Write programs that do one thing and do it well. Write programs to work together. Write…
Maglob
  • 3,839
  • 1
  • 24
  • 27
24
votes
8 answers

Any basic difference between Unix and Linux in design and other aspects?

I keep reading this sentence: Linux is a Unix-like system, but it is not Unix. I don't know what's the real difference between the two. I know Linux got a lot of ideas from Unix and the licenses of the two are different. Apart from that, as I am…
Gnijuohz
  • 2,035
  • 4
  • 20
  • 18
21
votes
3 answers

Simple explanation of the Unix sockets

I can search and I've already looked at the wikipedia entry and in some other places, but even though I have some programming experience, I don't really grasp the concept. Can you treat me like a 10 year old and give me a clear explanation on socket…
Elzo Valugi
  • 308
  • 1
  • 2
  • 9
20
votes
4 answers

Command line options style - POSIX or what?

Somewhere I saw a rant against java/javac allegedly using a mix of Windows and Unix style like java -classpath ... -ea ... Something IMHO, it is no mix, it's just like find works as well, isn't it? AFAIK, according to POSIX, the syntax should be…
maaartinus
  • 2,633
  • 1
  • 21
  • 29
20
votes
12 answers

Interviewing someone for general unix skills

How would you test a developer that claims to have *nix shell experience (just to be clear, we don't want to test if someone can develop on *nix, only that they know their way around the command line). I was thinking about making them solve a…
18
votes
3 answers

Why is the "kill" command called so?

Why was it decided to call the kill command "kill"? I mean, yes, this utility is often used to terminate processes, but it can actually be used to send any signal. Isn't it slightly confusing? Maybe there are some historical reasons. All I know from…
shabunc
  • 2,424
  • 2
  • 20
  • 27
12
votes
2 answers

Why are Oracle directories named /u01 /u02 etc...?

I've been working with the Oracle RDBMS for a few years and today, after installing one for the n-th time, I was left wondering, why do we install it in /u01, /u02, etc.? Of course you could install it somewhere else, but for some unknown reason,…
Eldelshell
  • 301
  • 1
  • 2
  • 8
12
votes
3 answers

Lowercase in Linux file names

As I find that UpperCase are really readable for first letter word separation in long complex names, I tend to give some of my Linux files names with some UpperCase. Mostly executables, some directories too. But it's been a few weeks I have remarked…
Stephane Rolland
  • 596
  • 1
  • 6
  • 17
8
votes
4 answers

What should developers know about UNIX-based systems?

I'm a bit amazed that this hasn't been asked by anyone yet, but at a high level, what should every developer know about working with UNIX-based systems? My *nix experience is very limited, because I have absolutely no reason to use it over Windows…
rwar
  • 81
  • 1
  • 2
6
votes
1 answer

Why does the C stdio 'ungetc' function exist?

In the C programming language (and many subsequent languages that either directly interfaced with or built a facsimile of the C's Standard IO functions), there exists a function called ungetc: int ungetc(int char, FILE *stream);. It 'puts back' a…
Qqwy
  • 4,709
  • 4
  • 31
  • 45
6
votes
2 answers

Modern Interpretation of the Unix Philosophy of "Rule of Generation"

According to Wikipedia, Eric S. Raymond said that one of the 17 Rules of Unix is the "Rule of Generation", stating that: Developers should avoid writing code by hand and instead write abstract high-level programs that generate code. This rule…
Green
  • 269
  • 1
  • 5
1
2 3 4