Questions tagged [unix]

NOTICE: All Unix questions must be related to programming; those that aren't will be closed. Use this tag only if your question relates to programming using Unix APIs or Unix-specific behavior, not just because you happen to run your code on Unix. General software issues should be directed to Unix & Linux Stack Exchange or to Super User.

Tag usage

The tag can be used for Unix system programming related problems. The tag can also contain programming questions about using the Unix platform. For non-programming Unix usage questions, visit the Unix & Linux Stack Exchange site.

Background

Unix was developed as an in-house operating system for AT&T, but in the 1980s became both a prime academic operating system (with U.C. Berkeley's version, called BSD, being the reference platform for development of what would become the Internet) and a commercial success in the form of AT&T's System V, Microsoft/SCO's XENIX (PCs) and various workstation versions from Sun, Silicon Graphics, and others.

In the 1990s, Sun's Solaris and the free Unix clone Linux would rise in popularity. Linux is largely Unix-compatible but lacks the trademark. Currently, Unix is commonly found on server platforms; the primary desktop variant is Mac OS X, based on BSD.

Apart from its command-line interface, most "Unices" support the standardized X Window System for GUIs. (So does Mac OS X, but its primary GUI is Apple's proprietary Quartz.)

The various Unix implementation (and to a lesser extent, clones such as Linux) are unified in a standard called POSIX. C has been its primary programming language since the 1970s, but many other languages are available.

Read more

47509 questions
20
votes
1 answer

What is the max size of AF_UNIX datagram message in Linux?

Currently I'm hitting a hard limit of 130688 bytes. If I try and send anything larger in one message I get a ENOBUFS error. I have checked the net.core.rmem_default, net.core.wmem_default, net.core.rmem_max, net.core.wmem_max, and…
Jaime
  • 1,182
  • 2
  • 12
  • 29
20
votes
3 answers

Symlink dotfiles

I am having trouble symlinking dotfiles. I have a folder in my home directory ~/dotfiles which I have synced to a github repo. I am trying to take my .vimrc file in ~/dotfiles/.vimrc and create a symbolic link to put it at ~/.vimrc. To do this I…
Dan Hessler
  • 371
  • 1
  • 2
  • 14
20
votes
2 answers

find - suppress "No such file or directory" errors

I can use -s in grep to suppress errors, but I don't see an equivalent for the find command in the man page... Is the only option to redirect STDERR>/dev/null? Or is there an option that handles this? (open to fancy awk and perl solutions if…
JacobIRR
  • 8,545
  • 8
  • 39
  • 68
20
votes
5 answers

Unix find command, what are the {} and \; for?

With this set of commands, what are the {} and \; characters for? find . -name '*.clj' -exec grep -r resources {} \;
Berlin Brown
  • 11,504
  • 37
  • 135
  • 203
20
votes
3 answers

How do I view a log file generated by screen (screenlog.0)

So I just found out I can create log files of everything I do in screen (C-a H). Sounds like a nice way to keep track of potential goofs in a particular screen session. However, when I went to try it out the logfile is reported as being a binary…
rg88
  • 20,742
  • 18
  • 76
  • 110
20
votes
11 answers

Why use Esc in vim?

The Vi editor was originally written on an ADM-3A terminal, which had the Escape key in place of the Tab key (compared to most modern keyboards). Many touch typists appreciate the fact that they can leave their hands on the keyboard home row while…
user537488
  • 927
  • 3
  • 8
  • 15
20
votes
3 answers

Go install not working with zsh

I feel like an idiot because I've installed this before on macOS and OSX but for some reason I can't see what I'm doing wrong. Please help!!! I've created a directory, ~/go, which will be my workspace. When I run go env from my home directory I get…
pascalallen
  • 296
  • 1
  • 3
  • 15
20
votes
1 answer

What do the identifiers PID, PPID, SID, PGID, UID, EUID mean?

I was assigned to Write a C program that prints the following identifiers PID, PPID, SID, PGID, UID, EUID. The assignment then went on to ask What represents each identifier? I have completed the program, but have not found adequate explanations…
David Deme
  • 331
  • 1
  • 2
  • 3
20
votes
5 answers

Using netcat (nc) as an HTTP proxy server and monitor

Is it possible to use the Unix netcat (nc) program to create a TCP proxy server and monitor? I would like all TCP traffic to be passed across the pipe, as well as sent to stdout for monitoring. Note this will be used for monitoring HTTP traffic…
Landon Kuhn
  • 76,451
  • 45
  • 104
  • 130
20
votes
2 answers

Re run previous command with different arguments

If you want to re run a command with the same arguments you can do something like this: vim long_filename cat !$ #same as 'cat long_filename' This saves having to type out the previous argument again when it is passed to…
noobcoder
  • 6,089
  • 2
  • 18
  • 34
20
votes
6 answers

oracle convert unix epoch time to date

The context is that there is an existing application in our product which generates and sends the EPOCH number to an existing oracle procedure & vice versa. It works in that procedure using something like this SELECT UTC_TO_DATE (1463533832) FROM…
Subhash Dike
  • 1,836
  • 1
  • 22
  • 37
20
votes
1 answer

Is python's shutil.move() atomic on linux?

I am wondering whether python's shutil.move is atomic on linux ? Is the behavior different if the source and destination files are on two different partitions or is it same as when they are present on the same partition ? I am more concerned to know…
Kisalay
  • 607
  • 1
  • 6
  • 11
20
votes
5 answers

What is the equivalent of "aptitude" in Mac OSX?

How to do "sudo apt-get install " on OSX?
TIMEX
  • 259,804
  • 351
  • 777
  • 1,080
20
votes
1 answer

PaxHeaders in tarball

I'm doing a tar like in C, and I've got a problem. I just want to archive and unarchive files and diretories, so I operate this command: tar -cvf NAME.tar FILE1 [FILE2...] Now I'm trying to get the header POSIX of this archive : struct…
Liroo Pierre
  • 875
  • 2
  • 9
  • 25
20
votes
4 answers

How to use Python's difflib to produce side-by-side comparison of two files similar to Unix sdiff command?

I am using Python 2.6 and I want to create a simple GUI with two side-by-side text panes comparing two text files (file1.txt & file2.txt) . I am using difflib but it is not clear for me how to produce a result similar to the sdiff Unix command.…
zml
  • 617
  • 7
  • 14